mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
added Austin
This commit is contained in:
parent
b6f3e249cd
commit
dbd1b9f586
12
105.md
12
105.md
|
@ -4,7 +4,7 @@ NIP-105
|
|||
API Service Marketplace
|
||||
-------------------------------
|
||||
|
||||
`draft` `optional` `author:coachchuckff` `author:unclejim21` `author:cmdruid`
|
||||
`draft` `optional` `author:coachchuckff` `author:unclejim21` `author:cmdruid` `author:austinkelsay`
|
||||
|
||||
This NIP defines `kind:31402` (a _parameterized replaceable event_) for broadcasting API services, endpoints and their costs in mSats. API services are offered ala carte to be paid via lightning invoices.
|
||||
|
||||
|
@ -22,7 +22,7 @@ API service providers will issue a `kind:31402` event as an API service offering
|
|||
## Server Functions
|
||||
### Create Invoice
|
||||
|
||||
Initally, the client will make a POST request to the `endpoint`. The POST body should be exactly what the underlying API is expecting less the API key. This information should also be represented in the `schema` portion of the `content` field.
|
||||
Initially, the client will make a POST request to the `endpoint`. The POST body should be exactly what the underlying API is expecting less the API key. This information should also be represented in the `schema` portion of the `content` field.
|
||||
|
||||
The service provider will then do the following:
|
||||
|
||||
|
@ -69,8 +69,8 @@ It is up to the Client to poll the `successAction` until a terminal result is re
|
|||
endpoint: string, // The POST endpoint you call to pay/fetch
|
||||
status: OfferingStatus, // UP/DOWN/CLOSED
|
||||
cost: number, // The cost per call in mSats
|
||||
schema?: Object, // Reccomended - JSON schema for the POST body of the endpoint
|
||||
outputSchema?: Object, // Reccomended - JSON schema for the response of the call
|
||||
schema?: Object, // Recommended - JSON schema for the POST body of the endpoint
|
||||
outputSchema?: Object, // Recommended - JSON schema for the response of the call
|
||||
description?: string // Optional - Description for the end user
|
||||
}
|
||||
```
|
||||
|
@ -208,7 +208,7 @@ The following is for the `gpt-3.5-turbo` output schema:
|
|||
}
|
||||
}
|
||||
```
|
||||
### Safey
|
||||
### Safety
|
||||
|
||||
It is not mandatory, but to raise the barrier to entry, clients should screen service provider's NIP-05 identifier. The domain used in their NIP-05, should be the same domain used for their endpoint.
|
||||
|
||||
|
@ -218,7 +218,7 @@ Clients may wish to create a whitelist of trusted service providers once tested.
|
|||
|
||||
- No data integrity - service providers can store/redistribute any data passed to them
|
||||
- Service providers could take payment and never return the product
|
||||
- Service providers are not gaurenteed to call the endpoint specified in the `s` tag
|
||||
- Service providers are not guaranteed to call the endpoint specified in the `s` tag
|
||||
- No recourse for errored API fetches
|
||||
- The `cost` field may not match the actual final price
|
||||
- No proof of purchase
|
||||
|
|
Loading…
Reference in New Issue
Block a user