mirror of
https://github.com/edufeed-org/nips.git
synced 2025-12-09 16:24:32 +00:00
merge nips 12, 16, 20 and 33 into nip 01 (#703)
Co-authored-by: Viktor Vsk <me@viktorvsk.com>
This commit is contained in:
parent
a5047326d4
commit
72bb8a128b
17 changed files with 141 additions and 318 deletions
24
15.md
24
15.md
|
|
@ -4,7 +4,7 @@ NIP-15
|
|||
Nostr Marketplace (for resilient marketplaces)
|
||||
-----------------------------------
|
||||
|
||||
`draft` `optional` `author:fiatjaf` `author:benarc` `author:motorina0` `author:talvasconcelos`
|
||||
`draft` `optional` `author:fiatjaf` `author:benarc` `author:motorina0` `author:talvasconcelos`
|
||||
|
||||
> Based on https://github.com/lnbits/Diagon-Alley
|
||||
|
||||
|
|
@ -33,13 +33,13 @@ The `merchant` admin software can be purely clientside, but for `convenience` an
|
|||
## `Merchant` publishing/updating products (event)
|
||||
|
||||
A merchant can publish these events:
|
||||
| Kind | | Description | NIP |
|
||||
|---------|------------------|---------------------------------------------------------------------------------------------------------------|-----------------------------------------|
|
||||
| `0 ` | `set_meta` | The merchant description (similar with any `nostr` public key). | [NIP01 ](https://github.com/nostr-protocol/nips/blob/master/01.md) |
|
||||
| `30017` | `set_stall` | Create or update a stall. | [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md) (Parameterized Replaceable Event) |
|
||||
| `30018` | `set_product` | Create or update a product. | [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md) (Parameterized Replaceable Event) |
|
||||
| `4 ` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. | [NIP04](https://github.com/nostr-protocol/nips/blob/master/04.md) |
|
||||
| `5 ` | `delete` | Delete a product or a stall. | [NIP09](https://github.com/nostr-protocol/nips/blob/master/09.md) |
|
||||
| Kind | | Description |
|
||||
| --------- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
|
||||
| `0 ` | `set_meta` | The merchant description (similar with any `nostr` public key). |
|
||||
| `30017` | `set_stall` | Create or update a stall. |
|
||||
| `30018` | `set_product` | Create or update a product. |
|
||||
| `4 ` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. |
|
||||
| `5 ` | `delete` | Delete a product or a stall. |
|
||||
|
||||
### Event `30017`: Create or update a stall.
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ Fields that are not self-explanatory:
|
|||
```json
|
||||
"tags": [["d", <String, id of stall]]
|
||||
```
|
||||
- the `d` tag is required by [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md). Its value MUST be the same as the stall `id`.
|
||||
- the `d` tag is required, its value MUST be the same as the stall `id`.
|
||||
|
||||
### Event `30018`: Create or update a product
|
||||
|
||||
|
|
@ -109,8 +109,8 @@ _Open_: better to move `spec` in the `tags` section of the event?
|
|||
]
|
||||
```
|
||||
|
||||
- the `d` tag is required by [NIP33](https://github.com/nostr-protocol/nips/blob/master/33.md). Its value MUST be the same as the product `id`.
|
||||
- the `t` tag is as searchable tag ([NIP12](https://github.com/nostr-protocol/nips/blob/master/12.md)). It represents different categories that the product can be part of (`food`, `fruits`). Multiple `t` tags can be present.
|
||||
- the `d` tag is required, its value MUST be the same as the product `id`.
|
||||
- the `t` tag is as searchable tag, it represents different categories that the product can be part of (`food`, `fruits`). Multiple `t` tags can be present.
|
||||
|
||||
## Checkout events
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ The below json goes in content of [NIP04](https://github.com/nostr-protocol/nips
|
|||
```
|
||||
|
||||
_Open_: is `contact.nostr` required?
|
||||
|
||||
|
||||
|
||||
### Step 2: `merchant` request payment (event)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue