Fix some minor nitpicks in NIP-15 and NIP-51

This commit is contained in:
Asai Toshiya 2024-01-16 23:28:23 +09:00 committed by fiatjaf_
parent 20d33785fc
commit d8d75d9b19
2 changed files with 17 additions and 17 deletions

20
15.md
View file

@ -56,7 +56,7 @@ A merchant can publish these events:
"id": <string, id of the shipping zone, generated by the merchant>,
"name": <string (optional), zone name>,
"cost": <float, base cost for shipping. The currency is defined at the stall level>,
"regions": [<string, regions included in this zone>],
"regions": [<string, regions included in this zone>]
}
]
}
@ -101,7 +101,7 @@ Fields that are not self-explanatory:
"shipping": [
{
"id": <string, id of the shipping zone (must match one of the zones defined for the stall)>,
"cost": <float, extra cost for shipping. The currency is defined at the stall level>,
"cost": <float, extra cost for shipping. The currency is defined at the stall level>
}
]
}
@ -139,7 +139,7 @@ Fields that are not self-explanatory:
## Checkout events
All checkout events are sent as JSON strings using ([NIP04](https://github.com/nostr-protocol/nips/blob/master/04.md)).
All checkout events are sent as JSON strings using ([NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md)).
The `merchant` and the `customer` can exchange JSON messages that represent different actions. Each `JSON` message `MUST` have a `type` field indicating the what the JSON represents. Possible types:
@ -150,19 +150,19 @@ The `merchant` and the `customer` can exchange JSON messages that represent diff
| 2 | Merchant | Order Status Update |
### Step 1: `customer` order (event)
The below json goes in content of [NIP04](https://github.com/nostr-protocol/nips/blob/master/04.md).
The below JSON goes in content of [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md).
```json
{
"id": <string, id generated by the customer>,
"type": 0,
"name": <string (optional), ???>,
"address": <string (optional), for physical goods an address should be provided>
"address": <string (optional), for physical goods an address should be provided>,
"message": "<string (optional), message for merchant>,
"contact": {
"nostr": <32-bytes hex of a pubkey>,
"phone": <string (optional), if the customer wants to be contacted by phone>,
"email": <string (optional), if the customer wants to be contacted by email>,
"email": <string (optional), if the customer wants to be contacted by email>
},
"items": [
{
@ -182,7 +182,7 @@ _Open_: is `contact.nostr` required?
Sent back from the merchant for payment. Any payment option is valid that the merchant can check.
The below json goes in `content` of [NIP04](https://github.com/nostr-protocol/nips/blob/master/04.md).
The below JSON goes in `content` of [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md).
`payment_options`/`type` include:
@ -217,7 +217,7 @@ The below json goes in `content` of [NIP04](https://github.com/nostr-protocol/ni
Once payment has been received and processed.
The below json goes in `content` of [NIP04](https://github.com/nostr-protocol/nips/blob/master/04.md).
The below JSON goes in `content` of [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md).
```json
{
@ -275,7 +275,7 @@ This event leverages naddr to enable comprehensive customization and sharing of
"shipping": [
{
"id": <String, UUID of the shipping zone. Must match one of the zones defined for the stall>,
"cost": <float, extra cost for shipping. The currency is defined at the stall level>,
"cost": <float, extra cost for shipping. The currency is defined at the stall level>
}
]
}
@ -310,7 +310,7 @@ Bids are simply events of kind `1021` with a `content` field specifying the amou
{
"status": <String, "accepted" | "rejected" | "pending" | "winner">,
"message": <String (optional)>,
"duration_extended": <int (optional), number of seconds>,
"duration_extended": <int (optional), number of seconds>
}
```