diff options
| author | starbuilder <101296187+starbackr-dev@users.noreply.github.com> | 2023-11-06 16:31:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-06 16:31:37 -0500 |
| commit | 56dbb7722c3d1a2c759277391960f41ba6948dcd (patch) | |
| tree | 8d3f8f5baf46667ef45ac918f515c839d559f0d2 /90.md | |
| parent | c2020929fbbcd667caa8ac67b706844512d19d7c (diff) | |
Update 90.md
changed and added [`encrypted`] to both 5xxx and 6xxx events
Diffstat (limited to '90.md')
| -rw-r--r-- | 90.md | 19 |
1 files changed, 18 insertions, 1 deletions
| @@ -91,7 +91,7 @@ This param data will be encrypted and added to the `content` field and `p` tag s | |||
| 91 | "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...", | 91 | "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...", |
| 92 | "tags": [ | 92 | "tags": [ |
| 93 | [`p`, `04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f`], | 93 | [`p`, `04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f`], |
| 94 | [ `param`, `encrypted`, true] | 94 | [`encrypted`] |
| 95 | ] | 95 | ] |
| 96 | 96 | ||
| 97 | 97 | ||
| @@ -124,6 +124,23 @@ Service providers publish job results, providing the output of the job result. T | |||
| 124 | ## Encrypted Output | 124 | ## Encrypted Output |
| 125 | 125 | ||
| 126 | 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. | 126 | 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. |
| 127 | Add a tag encrypted to mark the output content as `encrypted` | ||
| 128 | ```json | ||
| 129 | { | ||
| 130 | "pubkey": "<service-provider pubkey>", | ||
| 131 | "content": "<encrypted payload>", | ||
| 132 | "kind": 6xxx, | ||
| 133 | "tags": [ | ||
| 134 | [ "request", "<job-request>" ], | ||
| 135 | [ "e", "<job-request-id>", "<relay-hint>" ], | ||
| 136 | [ "p", "<customer's-pubkey>" ], | ||
| 137 | [ "amount", "requested-payment-amount", "<optional-bolt11>" ], | ||
| 138 | [`encrypted`] | ||
| 139 | |||
| 140 | ] | ||
| 141 | } | ||
| 142 | ``` | ||
| 143 | |||
| 127 | 144 | ||
| 128 | ## Job feedback | 145 | ## Job feedback |
| 129 | Service providers can give feedback about a job back to the customer. | 146 | Service providers can give feedback about a job back to the customer. |