mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
typos fix
This commit is contained in:
parent
3c57cd5cd7
commit
e17cbbe7d3
14
111.md
14
111.md
|
@ -56,7 +56,7 @@ let caip10 = `${caip02}:<checksum_address>`;
|
||||||
### e) Message
|
### e) Message
|
||||||
Deterministic `message` to be signed by the wallet provider,
|
Deterministic `message` to be signed by the wallet provider,
|
||||||
```js
|
```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
|
### 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.
|
- Connected Ethereum wallet Signer **MUST** be EIP-191 and RFC-6979 compatible.
|
||||||
- The `message` **MUST** be string formatted as
|
- 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 `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
|
- 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 Derived Key Length (`dkLen`) **MUST** be 42.
|
||||||
- HKDF `info` MUST be string formatted as
|
- HKDF `info` **MUST** be string formatted as
|
||||||
```
|
```
|
||||||
${CAIP_10}:${address}:${username}
|
${caip10}:${username}
|
||||||
```
|
```
|
||||||
|
|
||||||
## JS Example
|
## JS Example
|
||||||
|
@ -142,7 +142,7 @@ let username = "me@example.com"
|
||||||
let chainId = wallet.getChainId(); // get ChainID from connected wallet
|
let chainId = wallet.getChainId(); // get ChainID from connected wallet
|
||||||
let address = wallet.getAddress(); // get Address from wallet
|
let address = wallet.getAddress(); // get Address from wallet
|
||||||
let caip10 = `eip155:${chainId}:${address}`;
|
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 signature = wallet.signMessage(message); // request Signature from wallet
|
||||||
let password = "horse staple battery"
|
let password = "horse staple battery"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user