From bbd63278b42c50816a3aa6a412a4963a52c4edc5 Mon Sep 17 00:00:00 2001 From: biancabuzea200 Date: Thu, 26 Oct 2023 16:08:23 +0200 Subject: [PATCH] fix prettier ignore --- docs/learn/dapp-developer/siwe.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/learn/dapp-developer/siwe.md b/docs/learn/dapp-developer/siwe.md index 739c7e4741..2e1052c415 100644 --- a/docs/learn/dapp-developer/siwe.md +++ b/docs/learn/dapp-developer/siwe.md @@ -51,6 +51,7 @@ If you need further explanation on the `SiweMessage` properties, please have a l ::: + ```js import UniversalProfileContract from '@lukso/lsp-smart-contracts/artifacts/UniversalProfile.json'; import { SiweMessage } from 'siwe'; @@ -60,7 +61,6 @@ const myUniversalProfileContract = new web3.eth.Contract( accounts[0], ); - // To enable the Sign-In With Ethereum (SIWE) screen, you need to prepare a message with a specific format const hashedMessage = web3.eth.accounts.hashMessage( new SiweMessage({ @@ -73,13 +73,13 @@ const hashedMessage = web3.eth.accounts.hashMessage( resources: ['https://terms.website.com'], // Information the user wishes to have resolved as part of authentication by the relying party }).prepareMessage(), ); - // Request the user to sign the login message with his Universal Profile // The UP Browser Extension will sign the message with the controller key used by the extension (a smart contract can't sign) const signature = await web3.eth.sign(siweMessage, accounts[0]); // 0x38c53... ``` +
Raw SIWE message format