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:
authorAlex Gleason <alex@alexgleason.me>2026-04-10 13:31:37 -0500
committerAlex Gleason <alex@alexgleason.me>2026-04-10 13:31:37 -0500
commit5e1e24766910fc07cb61a049aed2623987458ec2 (patch)
treeb7588f61fddf9374268d5cd6f4e3f2655d7c840a /90.md
parentb8782df594b4e7e8f088869134908eed58be6078 (diff)
parent3465f540e3eaedccb5309711b502f0febf56b52f (diff)
Merge nip44-big-payloads into bigger-nip44bigger-nip44
Diffstat (limited to '90.md')
-rw-r--r--90.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/90.md b/90.md
index 785b539..a33d90a 100644
--- a/90.md
+++ b/90.md
@@ -58,7 +58,7 @@ All tags are optional.
58 * `<input-type>`: The way this argument should be interpreted. MUST be one of: 58 * `<input-type>`: The way this argument should be interpreted. MUST be one of:
59 * `url`: A URL to be fetched of the data that should be processed. 59 * `url`: A URL to be fetched of the data that should be processed.
60 * `event`: A Nostr event ID. 60 * `event`: A Nostr event ID.
61 * `job`: The output of a previous job with the specified event ID. The dermination of which output to build upon is up to the service provider to decide (e.g. waiting for a signaling from the customer, waiting for a payment, etc.) 61 * `job`: The output of a previous job with the specified event ID. The determination of which output to build upon is up to the service provider to decide (e.g. waiting for a signaling from the customer, waiting for a payment, etc.)
62 * `text`: `<data>` is the value of the input, no resolution is needed 62 * `text`: `<data>` is the value of the input, no resolution is needed
63 * `<relay>`: If `event` or `job` input-type, the relay where the event/job was published, otherwise optional or empty string 63 * `<relay>`: If `event` or `job` input-type, the relay where the event/job was published, otherwise optional or empty string
64 * `<marker>`: An optional field indicating how this input should be used within the context of the job 64 * `<marker>`: An optional field indicating how this input should be used within the context of the job
@@ -68,7 +68,7 @@ All tags are optional.
68* `relays`: List of relays where Service Providers SHOULD publish responses to 68* `relays`: List of relays where Service Providers SHOULD publish responses to
69* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job 69* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job
70 70
71## Encrypted Params 71### Encrypted Params
72 72
73If 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](04.md), using the user's private and service provider's public key for the shared secret 73If 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](04.md), using the user's private and service provider's public key for the shared secret
74 74
@@ -122,7 +122,7 @@ Service providers publish job results, providing the output of the job result. T
122* `amount`: millisats that the Service Provider is requesting to be paid. An optional third value can be a bolt11 invoice. 122* `amount`: millisats that the Service Provider is requesting to be paid. An optional third value can be a bolt11 invoice.
123* `i`: The original input(s) specified in the request. 123* `i`: The original input(s) specified in the request.
124 124
125## Encrypted Output 125### Encrypted Output
126 126
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`
@@ -180,7 +180,7 @@ Service providers can give feedback about a job back to the customer.
180Any job feedback event MIGHT include results in the `.content` field, as described in the [Job Result](#job-result-kind6000-6999) section. This is useful for service providers to provide a sample of the results that have been processed so far. 180Any job feedback event MIGHT include results in the `.content` field, as described in the [Job Result](#job-result-kind6000-6999) section. This is useful for service providers to provide a sample of the results that have been processed so far.
181 181
182 182
183# Protocol Flow 183## Protocol Flow
184 184
185* Customer publishes a job request (e.g. `kind:5000` speech-to-text). 185* Customer publishes a job request (e.g. `kind:5000` speech-to-text).
186* Service Providers MAY submit `kind:7000` job-feedback events (e.g. `payment-required`, `processing`, `error`, etc.). 186* Service Providers MAY submit `kind:7000` job-feedback events (e.g. `payment-required`, `processing`, `error`, etc.).
@@ -191,24 +191,24 @@ Job feedback (`kind:7000`) and Job Results (`kind:6000-6999`) events MAY include
191 191
192Customers can always either pay the included `bolt11` invoice or zap the event requesting the payment and service providers should monitor for both if they choose to include a bolt11 invoice. 192Customers can always either pay the included `bolt11` invoice or zap the event requesting the payment and service providers should monitor for both if they choose to include a bolt11 invoice.
193 193
194## Notes about the protocol flow 194### Notes about the protocol flow
195The flow is deliberately ambiguous, allowing vast flexibility for the interaction between customers and service providers so that service providers can model their behavior based on their own decisions/perceptions of risk. 195The flow is deliberately ambiguous, allowing vast flexibility for the interaction between customers and service providers so that service providers can model their behavior based on their own decisions/perceptions of risk.
196 196
197Some service providers might choose to submit a `payment-required` as the first reaction before sending a `processing` or before delivering results, some might choose to serve partial results for the job (e.g. a sample), send a `payment-required` to deliver the rest of the results, and some service providers might choose to assess likelihood of payment based on an npub's past behavior and thus serve the job results before requesting payment for the best possible UX. 197Some service providers might choose to submit a `payment-required` as the first reaction before sending a `processing` or before delivering results, some might choose to serve partial results for the job (e.g. a sample), send a `payment-required` to deliver the rest of the results, and some service providers might choose to assess likelihood of payment based on an npub's past behavior and thus serve the job results before requesting payment for the best possible UX.
198 198
199It's not up to this NIP to define how individual vending machines should choose to run their business. 199It's not up to this NIP to define how individual vending machines should choose to run their business.
200 200
201# Cancellation 201## Cancellation
202A job request might be canceled by publishing a `kind:5` delete request event tagging the job request event. 202A job request might be canceled by publishing a `kind:5` delete request event tagging the job request event.
203 203
204# Appendix 1: Job chaining 204## Appendix 1: Job chaining
205A Customer MAY request multiple jobs to be processed as a chain, where the output of a job is the input of another job. (e.g. podcast transcription -> summarization of the transcription). This is done by specifying as input an event id of a different job with the `job` type. 205A Customer MAY request multiple jobs to be processed as a chain, where the output of a job is the input of another job. (e.g. podcast transcription -> summarization of the transcription). This is done by specifying as input an event id of a different job with the `job` type.
206 206
207Service Providers MAY begin processing a subsequent job the moment they see the prior job's result, but they will likely wait for a zap to be published first. This introduces a risk that Service Provider of job #1 might delay publishing the zap event in order to have an advantage. This risk is up to Service Providers to mitigate or to decide whether the service provider of job #1 tends to have good-enough results so as to not wait for an explicit zap to assume the job was accepted. 207Service Providers MAY begin processing a subsequent job the moment they see the prior job's result, but they will likely wait for a zap to be published first. This introduces a risk that Service Provider of job #1 might delay publishing the zap event in order to have an advantage. This risk is up to Service Providers to mitigate or to decide whether the service provider of job #1 tends to have good-enough results so as to not wait for an explicit zap to assume the job was accepted.
208 208
209This gives a higher level of flexibility to service providers (which sophisticated service providers would take anyway). 209This gives a higher level of flexibility to service providers (which sophisticated service providers would take anyway).
210 210
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```jsonc 214```jsonc