upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--46.md29
1 files changed, 15 insertions, 14 deletions
diff --git a/46.md b/46.md
index d4b5728..e0a5b2e 100644
--- a/46.md
+++ b/46.md
@@ -61,8 +61,9 @@ nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata
61 "method": "sign_event", 61 "method": "sign_event",
62 "params": [json_stringified(<{ 62 "params": [json_stringified(<{
63 content: "Hello, I'm signing remotely", 63 content: "Hello, I'm signing remotely",
64 pubkey: "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", 64 kind: 1,
65 // ...the rest of the event data 65 tags: [],
66 created_at: 1714078911
66 }>)] 67 }>)]
67 }), 68 }),
68 "tags": [["p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"]], // p-tags the remote user pubkey 69 "tags": [["p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"]], // p-tags the remote user pubkey
@@ -118,21 +119,21 @@ The `content` field is a JSON-RPC-like message that is [NIP-04](https://github.c
118 119
119Each of the following are methods that the client sends to the remote signer. 120Each of the following are methods that the client sends to the remote signer.
120 121
121| Command | Params | Result | 122| Command | Params | Result |
122| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- | 123| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- |
123| `connect` | `[<remote_user_pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" | 124| `connect` | `[<remote_user_pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" |
124| `sign_event` | `[<json_stringified_event_to_sign>]` | `json_stringified(<signed_event>)` | 125| `sign_event` | `[<{kind, content, tags, created_at}>]` | `json_stringified(<signed_event>)` |
125| `ping` | `[]` | "pong" | 126| `ping` | `[]` | "pong" |
126| `get_relays` | `[]` | `json_stringified({<relay_url>: {read: <boolean>, write: <boolean>}})` | 127| `get_relays` | `[]` | `json_stringified({<relay_url>: {read: <boolean>, write: <boolean>}})` |
127| `get_public_key` | `[]` | `<hex-pubkey>` | 128| `get_public_key` | `[]` | `<hex-pubkey>` |
128| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` | 129| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` |
129| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` | 130| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` |
130| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` | 131| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` |
131| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` | 132| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` |
132 133
133### Requested permissions 134### Requested permissions
134 135
135The `connect` method may be provided with `optional_requested_permissions` for user convenience. The permissions are a comma-separated list of `method[:params]`, i.e. `nip04_encrypt,sign_event:4` meaning permissions to call `nip04_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. 136The `connect` method may be provided with `optional_requested_permissions` for user convenience. The permissions are a comma-separated list of `method[:params]`, i.e. `nip04_encrypt,sign_event:4` meaning permissions to call `nip04_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.
136 137
137## Response Events `kind:24133` 138## Response Events `kind:24133`
138 139