upleb.uk

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

summaryrefslogtreecommitdiff
path: root/59.md
diff options
context:
space:
mode:
authorFrancisco Calderón <fjcalderon@gmail.com>2024-11-04 15:39:21 -0300
committerGitHub <noreply@github.com>2024-11-04 15:39:21 -0300
commit03f3bc39678262ecbd5d870c9da44723023557ff (patch)
treee75ecf32d3bc906a8b26314488a1ae90996169c1 /59.md
parentf72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff)
parent6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff)
Merge branch 'master' into p2p-nip
Diffstat (limited to '59.md')
-rw-r--r--59.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/59.md b/59.md
index 4dc857f..9bb5845 100644
--- a/59.md
+++ b/59.md
@@ -41,7 +41,7 @@ A `seal` is a `kind:13` event that wraps a `rumor` with the sender's regular key
41to a receiver's pubkey but there is no `p` tag pointing to the receiver. There is no way to know who the rumor is for 41to a receiver's pubkey but there is no `p` tag pointing to the receiver. There is no way to know who the rumor is for
42without the receiver's or the sender's private key. The only public information in this event is who is signing it. 42without the receiver's or the sender's private key. The only public information in this event is who is signing it.
43 43
44```js 44```json
45{ 45{
46 "id": "<id>", 46 "id": "<id>",
47 "pubkey": "<real author's pubkey>", 47 "pubkey": "<real author's pubkey>",
@@ -60,7 +60,7 @@ Tags MUST must always be empty in a `kind:13`. The inner event MUST always be un
60A `gift wrap` event is a `kind:1059` event that wraps any other event. `tags` SHOULD include any information 60A `gift wrap` event is a `kind:1059` event that wraps any other event. `tags` SHOULD include any information
61needed to route the event to its intended recipient, including the recipient's `p` tag or [NIP-13](13.md) proof of work. 61needed to route the event to its intended recipient, including the recipient's `p` tag or [NIP-13](13.md) proof of work.
62 62
63```js 63```json
64{ 64{
65 "id": "<id>", 65 "id": "<id>",
66 "pubkey": "<random, one-time-use pubkey>", 66 "pubkey": "<random, one-time-use pubkey>",
@@ -245,7 +245,7 @@ const rumor = createRumor(
245const seal = createSeal(rumor, senderPrivateKey, recipientPublicKey) 245const seal = createSeal(rumor, senderPrivateKey, recipientPublicKey)
246const wrap = createWrap(seal, recipientPublicKey) 246const wrap = createWrap(seal, recipientPublicKey)
247 247
248// Recipient unwraps with his/her private key. 248// Recipient unwraps with their private key.
249 249
250const unwrappedSeal = nip44Decrypt(wrap, recipientPrivateKey) 250const unwrappedSeal = nip44Decrypt(wrap, recipientPrivateKey)
251const unsealedRumor = nip44Decrypt(unwrappedSeal, recipientPrivateKey) 251const unsealedRumor = nip44Decrypt(unwrappedSeal, recipientPrivateKey)