URL encoding + anatomy

This commit is contained in:
Egge 2023-12-29 06:40:42 +01:00
parent 17c67ef557
commit e6041300ce

8
47.md
View File

@ -78,11 +78,13 @@ If the command was successful, the `error` field must be null.
- `OTHER`: Other error.
## Nostr Wallet Connect URI
**client** discovers **wallet service** by scanning a QR code, handling a deeplink or pasting in a URI.
**client** discovers **wallet service** by it's URI; either by scanning a QR code, handling a deeplink or pasting in the URI.
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:
The URI consists of the scheme, a path and a query.
- `relay` Required. URL of the relay where the **wallet service** is connected and will be listening for events. May be more than one.
The **wallet service** generates this connection URI with scheme `nostr+walletconnect:`, it's hex-encoded `pubkey` as base path, and the following query string parameters:
- `relay` Required. URL-encoded 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**.
- 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).