Update 90.md

changed and added [`encrypted`] to both 5xxx and 6xxx events
This commit is contained in:
starbuilder 2023-11-06 16:31:37 -05:00 committed by GitHub
parent c2020929fb
commit 56dbb7722c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

19
90.md
View File

@ -91,7 +91,7 @@ This param data will be encrypted and added to the `content` field and `p` tag s
"content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...", "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
"tags": [ "tags": [
[`p`, `04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f`], [`p`, `04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f`],
[ `param`, `encrypted`, true] [`encrypted`]
] ]
@ -124,6 +124,23 @@ Service providers publish job results, providing the output of the job result. T
## Encrypted Output ## Encrypted Output
If the request has encrypted params, then output should be encrypted and placed in `content` field with `p` tag. If the output is encrypted, then avoid including `i` tag with input-data as clear text. If the request has encrypted params, then output should be encrypted and placed in `content` field with `p` tag. If the output is encrypted, then avoid including `i` tag with input-data as clear text.
Add a tag encrypted to mark the output content as `encrypted`
```json
{
"pubkey": "<service-provider pubkey>",
"content": "<encrypted payload>",
"kind": 6xxx,
"tags": [
[ "request", "<job-request>" ],
[ "e", "<job-request-id>", "<relay-hint>" ],
[ "p", "<customer's-pubkey>" ],
[ "amount", "requested-payment-amount", "<optional-bolt11>" ],
[`encrypted`]
]
}
```
## Job feedback ## Job feedback
Service providers can give feedback about a job back to the customer. Service providers can give feedback about a job back to the customer.