fix: make kind 21120

This commit is contained in:
_ 2025-03-25 22:26:58 +00:00
parent c02f2fcea8
commit 88e02cc119

@ -44,7 +44,7 @@ sequenceDiagram
participant b as Blossom Server participant b as Blossom Server
participant s as HTTP Server participant s as HTTP Server
Note over c: Convert <br>HTTP Request<br>into kind 1120 Note over c: Convert <br>HTTP Request<br>into kind 21120
c-->>b: Encrypt & push payload (if large) c-->>b: Encrypt & push payload (if large)
c->>r: Publish <br>Event c->>r: Publish <br>Event
r<<-->>s: Fetch event r<<-->>s: Fetch event
@ -53,7 +53,7 @@ sequenceDiagram
Note over s: Make HTTP REQUEST Note over s: Make HTTP REQUEST
Note over s: Get HTTP RESPONSE Note over s: Get HTTP RESPONSE
s-->>b: Encrypt & push <br>payload (if large) s-->>b: Encrypt & push <br>payload (if large)
Note over s: Create kind<br>1120 (Response) Note over s: Create kind<br>21120 (Response)
s->>r: Publish Event s->>r: Publish Event
r<<-->>c: Fetch event r<<-->>c: Fetch event
Note over c: Decrypt event Note over c: Decrypt event
@ -68,7 +68,7 @@ sequenceDiagram
```jsonc ```jsonc
{ {
"kind": 1120, "kind": 21120,
"pubkey": "<pubkey>", "pubkey": "<pubkey>",
"content": "nip44Encrypt({'url':'blossom.one','hash':'xx','decrypt':'password123'})", "content": "nip44Encrypt({'url':'blossom.one','hash':'xx','decrypt':'password123'})",
"tags": [ "tags": [
@ -81,7 +81,7 @@ sequenceDiagram
Explanations: Explanations:
* `kind:1120` - BIP39 word #1120 ([message](https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt#L1120)). * `kind:21120` - BIP39 word #1120 ([message](https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt#L1120)), plus 20,000 to be treated as ephemeral (not stored by relays).
* `"content"` - encrypted (NIP-44) JSON with location of blob and decryption key **OR** the content itself (if under a threshold) * `"content"` - encrypted (NIP-44) JSON with location of blob and decryption key **OR** the content itself (if under a threshold)
* `"E"` - ID of the request event. Enables a response to be easily identified. * `"E"` - ID of the request event. Enables a response to be easily identified.
* `"r"` - (optional) relay on which the response should be sent. For Requests only. * `"r"` - (optional) relay on which the response should be sent. For Requests only.