mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-13 23:39:08 -05:00
NIP-47 Optional Secret
This commit is contained in:
parent
01b6bfc286
commit
517125da7e
4
47.md
4
47.md
|
@ -83,13 +83,15 @@ If the command was successful, the `error` field must be null.
|
|||
The **wallet service** generates this connection URI with protocol `nostr+walletconnect:` and base path it's hex-encoded `pubkey` with the following query string parameters:
|
||||
|
||||
- `relay` Required. URL of the relay where the **wallet service** is connected and will be listening for events. May be more than one.
|
||||
- `secret` Required. 32-byte randomly generated hex encoded string. The **client** MUST use this to sign events and encrypt payloads when communicating with the **wallet service**.
|
||||
- `secret` Recommended. 32-byte randomly generated hex encoded string. The **client** MUST use this if present to sign events and encrypt payloads when communicating with the **wallet service**.
|
||||
- Authorization does not require passing keys back and forth.
|
||||
- The user can have different keys for different applications. Keys can be revoked and created at will and have arbitrary constraints (eg. budgets).
|
||||
- The key is harder to leak since it is not shown to the user and backed up.
|
||||
- It improves privacy because the user's main key would not be linked to their payments.
|
||||
- `lud16` Recommended. A lightning address that clients can use to automatically setup the `lud16` field on the user's profile if they have none configured.
|
||||
|
||||
The **client** MAY generate a 32-byte random secret and store it and uses this secret when it wants to perform an action. The corresponding public key must be passed to the **wallet service** to allow it to authorize the **client**. The **client** MUST only use this secret if the wallet service does not return a different secret to the client.
|
||||
|
||||
The **client** should then store this connection and use it when the user wants to perform actions like paying an invoice. Due to this NIP using ephemeral events, it is recommended to pick relays that do not close connections on inactivity to not drop events.
|
||||
|
||||
### Example connection string
|
||||
|
|
Loading…
Reference in New Issue
Block a user