diff --git a/90.md b/90.md index 4065b20d..949a6eba 100644 --- a/90.md +++ b/90.md @@ -44,11 +44,11 @@ The following are two protocol flow examples using the 1174 event kind. Other fl ```json { "id": <32-bytes lowercase hex-encoded sha256 of the serialized event data>, - "pubkey": <32-bytes lowercase hex-encoded public key>, - "created_at": , + "pubkey": <32-bytes lowercase hex-encoded public key of event creator>, + "created_at": , "kind": 1174 , "tags": [ - [“e”, <32-bytes lowercase hex-encoded sha256 of the previous serialized event data> ], // provided when replying + [“e”, <32-bytes lowercase hex-encoded sha256 id of the previous serialized event data> ], [“magic”, <4-byte hex value representing the Bitcoin network identifier>], [“relays”, ], ], @@ -57,19 +57,20 @@ The following are two protocol flow examples using the 1174 event kind. Other fl } ``` -## Explanation of fields: -``` -id: The sha256 hash of the serialized event payload. -pubkey: The public key of the creator of the event. -created_at: A Unix timestamp indicating the time when the event was created. -kind: An integer value used to indicate the type of event. For PSBTs, the kind is set to 1174. -tags: An array of tags to capture additional information about the multisig transaction: - “e”: (optional): the 32 byte lowercase hex encoded sha256 event id of a prior event id. Only required when replying. - “magic”: the 4 byte hex representation of the network that the transaction belongs to. - “relays”: (optional) tag provides relays to broadcast the transactions. -content: PSBT encoded as base64. -sig: The signature of the sha256 hash of the serialized event data, which is the same as the "id" field. -``` +### Additional Encryption +The encryption used by DMs in NIP-04 can be utilized to further protect the base64 encoded data in the `content` field. This adds an extra layer of protection from those attempting to get information regarding transaction creation via nostr event data similar to how NIP-46 and NIP-47 implement NIP-04. + +- **nip04_encrypt** + - params [`pubkey`, `plaintext`] + - result `nip4 ciphertext` +- **nip04_decrypt** + - params [`pubkey`, `nip4 ciphertext`] + - result [`plaintext`] + +Note that `pubkey` is a hex-encoded strings. ### Note: +The "e" field is optional and is used when replying to a prior event. + The "relays" field is optional and can be used to provide relay URL recommendations to clients for improved censorship resistance. +