mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-09-20 06:45:49 -04:00
NIP-90: let "encrypted" tag have an optional value of nip04
or nip44
This commit is contained in:
parent
a649a75e5a
commit
a1d348cfea
14
90.md
14
90.md
|
@ -69,7 +69,15 @@ All tags are optional.
|
|||
|
||||
## Encrypted Params
|
||||
|
||||
If the user wants to keep the input parameters a secret, they can encrypt the `i` and `param` tags with the service provider's 'p' tag and add it to the content field. Add a tag `encrypted` as tags. Encryption for private tags will use [NIP-04 - Encrypted Direct Message encryption](https://github.com/nostr-protocol/nips/blob/master/04.md), using the user's private and service provider's public key for the shared secret
|
||||
If the user wants to keep the input parameters a secret, they can encrypt the `i` and `param` tags with the service provider's 'p' tag and add it to the content field.
|
||||
|
||||
Requests with encrypted content should include a tag like `["encrypted", <encryption>]`, where encryption is one of:
|
||||
|
||||
- `nip04` for [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md)
|
||||
- `nip44` for [NIP-44](https://github.com/nostr-protocol/nips/blob/master/44.md)
|
||||
- if not provided (eg `["encrypted"]`), the encryption method is assumed to be `nip04` for backwards-compatibility.
|
||||
|
||||
Encryption for private tags will use the user's private and service provider's public key for the shared secret.
|
||||
|
||||
```json
|
||||
[
|
||||
|
@ -91,7 +99,7 @@ This param data will be encrypted and added to the `content` field and `p` tag s
|
|||
"content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
|
||||
"tags": [
|
||||
["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"],
|
||||
["encrypted"]
|
||||
["encrypted", "nip04"]
|
||||
],
|
||||
...
|
||||
}
|
||||
|
@ -137,7 +145,7 @@ Add a tag encrypted to mark the output content as `encrypted`
|
|||
["e", "<job-request-id>", "<relay-hint>"],
|
||||
["p", "<customer's-pubkey>"],
|
||||
["amount", "requested-payment-amount", "<optional-bolt11>"],
|
||||
["encrypted"]
|
||||
["encrypted", "nip04"]
|
||||
],
|
||||
...
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user