mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-03-25 17:21:52 +01:00
Merge f1feddac4c08e9408e4544db0f67aa63f300546c into 0619f370bca3485bb9c5870bc2defa03c7c3d10e
This commit is contained in:
commit
ccd3cca904
15
46.md
15
46.md
@ -97,18 +97,25 @@ Each of the following are methods that the _client_ sends to the _remote-signer_
|
||||
|
||||
| Command | Params | Result |
|
||||
| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `connect` | `[<remote-signer-pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" OR `<required-secret-value>` |
|
||||
| `connect` | `[<remote-signer-pubkey>, <optional_secret>, <optional_perms>]` | "ack" (deprecated) OR `<required-secret-value>` |
|
||||
| `delegate` | `[<perms>]` | `<bunker-url>` |
|
||||
| `sign_event` | `[<{kind, content, tags, created_at}>]` | `json_stringified(<signed_event>)` |
|
||||
| `ping` | `[]` | "pong" |
|
||||
| `get_public_key` | `[]` | `<user-pubkey>` |
|
||||
| `get_public_key` | `[]` | `<user-pubkey>` |
|
||||
| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` |
|
||||
| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` |
|
||||
| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` |
|
||||
| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` |
|
||||
|
||||
### Requested permissions
|
||||
### Requested Permissions
|
||||
|
||||
The `connect` method may be provided with `optional_requested_permissions` for user convenience. The permissions are a comma-separated list of `method[:params]`, i.e. `nip44_encrypt,sign_event:4` meaning permissions to call `nip44_encrypt` and to call `sign_event` with `kind:4`. Optional parameter for `sign_event` is the kind number, parameters for other methods are to be defined later. Same permission format may be used for `perms` field of `metadata` in `nostrconnect://` string.
|
||||
`perms` is a comma-separated list of `method[:params]`, i.e. `nip44_encrypt,sign_event:4` meaning permissions to call `nip44_encrypt` and to call `sign_event` with `kind:4`. Optional parameter for `sign_event` is the kind number, parameters for other methods are to be defined later.
|
||||
|
||||
### Delegation
|
||||
|
||||
The `delegate` method MUST provide a comma-separated list of allowed permissions and return a bunker url representing a fresh session. The bunker MUST NOT allow this session to request additional permissions, returning an error message for any requests that are not allowed by the initial `perms` string.
|
||||
|
||||
Signers MUST revoke delegated sessions when the parent session is invalidated. Signers MUST NOT allow delegated sessions to create nested delegated sessions.
|
||||
|
||||
## Response Events `kind:24133`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user