mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
nip46: signer should fill in pubkey, id and sig on sign_event.
This commit is contained in:
parent
6071f3489e
commit
243b286582
27
46.md
27
46.md
|
@ -61,8 +61,9 @@ nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata
|
||||||
"method": "sign_event",
|
"method": "sign_event",
|
||||||
"params": [json_stringified(<{
|
"params": [json_stringified(<{
|
||||||
content: "Hello, I'm signing remotely",
|
content: "Hello, I'm signing remotely",
|
||||||
pubkey: "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52",
|
kind: 1,
|
||||||
// ...the rest of the event data
|
tags: [],
|
||||||
|
created_at: 1714078911
|
||||||
}>)]
|
}>)]
|
||||||
}),
|
}),
|
||||||
"tags": [["p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"]], // p-tags the remote user pubkey
|
"tags": [["p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"]], // p-tags the remote user pubkey
|
||||||
|
@ -118,17 +119,17 @@ The `content` field is a JSON-RPC-like message that is [NIP-04](https://github.c
|
||||||
|
|
||||||
Each of the following are methods that the client sends to the remote signer.
|
Each of the following are methods that the client sends to the remote signer.
|
||||||
|
|
||||||
| Command | Params | Result |
|
| Command | Params | Result |
|
||||||
| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- |
|
| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||||
| `connect` | `[<remote_user_pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" |
|
| `connect` | `[<remote_user_pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" |
|
||||||
| `sign_event` | `[<json_stringified_event_to_sign>]` | `json_stringified(<signed_event>)` |
|
| `sign_event` | `[<{kind, content, tags, created_at}>]` | `json_stringified(<signed_event>)` |
|
||||||
| `ping` | `[]` | "pong" |
|
| `ping` | `[]` | "pong" |
|
||||||
| `get_relays` | `[]` | `json_stringified({<relay_url>: {read: <boolean>, write: <boolean>}})` |
|
| `get_relays` | `[]` | `json_stringified({<relay_url>: {read: <boolean>, write: <boolean>}})` |
|
||||||
| `get_public_key` | `[]` | `<hex-pubkey>` |
|
| `get_public_key` | `[]` | `<hex-pubkey>` |
|
||||||
| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` |
|
| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` |
|
||||||
| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` |
|
| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` |
|
||||||
| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` |
|
| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` |
|
||||||
| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` |
|
| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` |
|
||||||
|
|
||||||
### Requested permissions
|
### Requested permissions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user