diff --git a/111.md b/111.md index f091862e..531beab7 100644 --- a/111.md +++ b/111.md @@ -56,7 +56,7 @@ let caip10 = `${caip02}:`; ### e) Message Deterministic `message` to be signed by the wallet provider, ```js -let message = `Log into Nostr client as '${username}'\n\nIMPORTANT: Please verify the integrity and authenticity of connected Nostr client before signing this message\n\nSIGNED BY: ${info}` +let message = `Log into Nostr client as '${username}'\n\nIMPORTANT: Please verify the integrity and authenticity of connected Nostr client before signing this message\n\nSIGNED BY: ${caip10}` ``` ### f) Signature @@ -115,17 +115,17 @@ The resulting architecture of NIP-111 can be visually interpreted as follows: - Connected Ethereum wallet Signer **MUST** be EIP-191 and RFC-6979 compatible. - The `message` **MUST** be string formatted as ``` -Login to Nostr as ${username}\n\nImportant: Please verify the integrity and authenticity of your Nostr client before signing this message.\n${info}`. +`Log into Nostr client as '${username}'\n\nIMPORTANT: Please verify the integrity and authenticity of connected Nostr client before signing this message\n\nSIGNED BY: ${caip10}` ``` - HKDF `inputKey` **MUST** be generated as the SHA-256 hash of 65 bytes long signature. - HKDF `salt` **MUST** be generated as SHA-256 hash of string ``` -${info}:${username}:${password?password:""}:${signature.slice(68)} +${info}:${password?password:""}:${signature.slice(68)} ``` -- HKDF Derived Key Length (`dkLen`) MUST be 42. -- HKDF `info` MUST be string formatted as +- HKDF Derived Key Length (`dkLen`) **MUST** be 42. +- HKDF `info` **MUST** be string formatted as ``` -${CAIP_10}:${address}:${username} +${caip10}:${username} ``` ## JS Example @@ -142,7 +142,7 @@ let username = "me@example.com" let chainId = wallet.getChainId(); // get ChainID from connected wallet let address = wallet.getAddress(); // get Address from wallet let caip10 = `eip155:${chainId}:${address}`; -let message = `Login to Nostr as ${username}\n\nImportant: Please verify the integrity and authenticity of your Nostr client before signing this message.\n${caip10}` +let message = `Log into Nostr client as '${username}'\n\nIMPORTANT: Please verify the integrity and authenticity of connected Nostr client before signing this message\n\nSIGNED BY: ${caip10}` let signature = wallet.signMessage(message); // request Signature from wallet let password = "horse staple battery"