upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/90.md
diff options
context:
space:
mode:
authorFrancisco Calderón <fjcalderon@gmail.com>2024-11-04 15:39:21 -0300
committerGitHub <noreply@github.com>2024-11-04 15:39:21 -0300
commit03f3bc39678262ecbd5d870c9da44723023557ff (patch)
treee75ecf32d3bc906a8b26314488a1ae90996169c1 /90.md
parentf72a2f69ed93cf442e83bf9e7e16f6c06da40384 (diff)
parent6bcd89c097e97e65dbc95e7c6b7b8348e8dd6b5c (diff)
Merge branch 'master' into p2p-nip
Diffstat (limited to '90.md')
-rw-r--r--90.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/90.md b/90.md
index 5a15ebb..696ebd5 100644
--- a/90.md
+++ b/90.md
@@ -36,7 +36,7 @@ There are two actors in the workflow described in this NIP:
36## Job request (`kind:5000-5999`) 36## Job request (`kind:5000-5999`)
37A request to process data, published by a customer. This event signals that a customer is interested in receiving the result of some kind of compute. 37A request to process data, published by a customer. This event signals that a customer is interested in receiving the result of some kind of compute.
38 38
39```json 39```jsonc
40{ 40{
41 "kind": 5xxx, // kind in 5000-5999 range 41 "kind": 5xxx, // kind in 5000-5999 range
42 "content": "", 42 "content": "",
@@ -46,7 +46,8 @@ A request to process data, published by a customer. This event signals that a cu
46 [ "relays", "wss://..." ], 46 [ "relays", "wss://..." ],
47 [ "bid", "<msat-amount>" ], 47 [ "bid", "<msat-amount>" ],
48 [ "t", "bitcoin" ] 48 [ "t", "bitcoin" ]
49 ] 49 ],
50 // other fields...
50} 51}
51``` 52```
52 53
@@ -81,19 +82,18 @@ If the user wants to keep the input parameters a secret, they can encrypt the `i
81 ["param", "top-p", "0.7"], 82 ["param", "top-p", "0.7"],
82 ["param", "frequency_penalty", "1"] 83 ["param", "frequency_penalty", "1"]
83] 84]
84
85``` 85```
86 86
87This param data will be encrypted and added to the `content` field and `p` tag should be present 87This param data will be encrypted and added to the `content` field and `p` tag should be present
88 88
89```json 89```jsonc
90{ 90{
91 "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...", 91 "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
92 "tags": [ 92 "tags": [
93 ["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"], 93 ["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"],
94 ["encrypted"] 94 ["encrypted"]
95 ], 95 ],
96 ... 96 // other fields...
97} 97}
98``` 98```
99 99
@@ -102,7 +102,7 @@ This param data will be encrypted and added to the `content` field and `p` tag s
102 102
103Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey. 103Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey.
104 104
105```json 105```jsonc
106{ 106{
107 "pubkey": "<service-provider pubkey>", 107 "pubkey": "<service-provider pubkey>",
108 "content": "<payload>", 108 "content": "<payload>",
@@ -114,7 +114,7 @@ Service providers publish job results, providing the output of the job result. T
114 ["p", "<customer's-pubkey>"], 114 ["p", "<customer's-pubkey>"],
115 ["amount", "requested-payment-amount", "<optional-bolt11>"] 115 ["amount", "requested-payment-amount", "<optional-bolt11>"]
116 ], 116 ],
117 ... 117 // other fields...
118} 118}
119``` 119```
120 120
@@ -127,7 +127,7 @@ Service providers publish job results, providing the output of the job result. T
127If the request has encrypted params, then output should be encrypted and placed in `content` field. If the output is encrypted, then avoid including `i` tag with input-data as clear text. 127If the request has encrypted params, then output should be encrypted and placed in `content` field. If the output is encrypted, then avoid including `i` tag with input-data as clear text.
128Add a tag encrypted to mark the output content as `encrypted` 128Add a tag encrypted to mark the output content as `encrypted`
129 129
130```json 130```jsonc
131{ 131{
132 "pubkey": "<service-provider pubkey>", 132 "pubkey": "<service-provider pubkey>",
133 "content": "<encrypted payload>", 133 "content": "<encrypted payload>",
@@ -139,7 +139,7 @@ Add a tag encrypted to mark the output content as `encrypted`
139 ["amount", "requested-payment-amount", "<optional-bolt11>"], 139 ["amount", "requested-payment-amount", "<optional-bolt11>"],
140 ["encrypted"] 140 ["encrypted"]
141 ], 141 ],
142 ... 142 // other fields...
143} 143}
144``` 144```
145 145
@@ -147,7 +147,7 @@ Add a tag encrypted to mark the output content as `encrypted`
147 147
148Service providers can give feedback about a job back to the customer. 148Service providers can give feedback about a job back to the customer.
149 149
150```json 150```jsonc
151{ 151{
152 "kind": 7000, 152 "kind": 7000,
153 "content": "<empty-or-payload>", 153 "content": "<empty-or-payload>",
@@ -157,7 +157,7 @@ Service providers can give feedback about a job back to the customer.
157 ["e", "<job-request-id>", "<relay-hint>"], 157 ["e", "<job-request-id>", "<relay-hint>"],
158 ["p", "<customer's-pubkey>"], 158 ["p", "<customer's-pubkey>"],
159 ], 159 ],
160 ... 160 // other fields...
161} 161}
162``` 162```
163 163
@@ -211,7 +211,7 @@ This gives a higher level of flexibility to service providers (which sophisticat
211# Appendix 2: Service provider discoverability 211# Appendix 2: Service provider discoverability
212Service Providers MAY use NIP-89 announcements to advertise their support for job kinds: 212Service Providers MAY use NIP-89 announcements to advertise their support for job kinds:
213 213
214```js 214```jsonc
215{ 215{
216 "kind": 31990, 216 "kind": 31990,
217 "pubkey": "<pubkey>", 217 "pubkey": "<pubkey>",
@@ -223,7 +223,7 @@ Service Providers MAY use NIP-89 announcements to advertise their support for jo
223 ["k", "5005"], // e.g. translation 223 ["k", "5005"], // e.g. translation
224 ["t", "bitcoin"] // e.g. optionally advertises it specializes in bitcoin audio transcription that won't confuse "Drivechains" with "Ridechains" 224 ["t", "bitcoin"] // e.g. optionally advertises it specializes in bitcoin audio transcription that won't confuse "Drivechains" with "Ridechains"
225 ], 225 ],
226 ... 226 // other fields...
227} 227}
228``` 228```
229 229