diff --git a/lnbits/extensions/market/README.md b/lnbits/extensions/market/README.md index 22d38e0d..88f89674 100644 --- a/lnbits/extensions/market/README.md +++ b/lnbits/extensions/market/README.md @@ -1,9 +1,198 @@ -
+## Nostr Diagon Alley protocol (for resilient marketplaces)
-curl -X GET http://YOUR-TOR-ADDRESS
+> The concepts around resilience in Diagon Alley helped influence the creation of the NOSTR protocol, now we get to build Diagon Alley on NOSTR!
+
+In Diagon Alley, `merchant` and `customer` communicate via NOSTR relays, so loss of money, product information, and reputation become far less likely if attacked.
+
+A `merchant` and `customer` both have a NOSTR key-pair that are used to sign notes and subscribe to events.
+
+#### For further information about NOSTR, see https://github.com/nostr-protocol/nostr
+
+
+## Terms
+
+* `merchant` - seller of products with NOSTR key-pair
+* `customer` - buyer of products with NOSTR key-pair
+* `product` - item for sale by the `merchhant`
+* `stall` - list of products controlled by `merchant`
+* `marketplace` - clientside software for searching `stalls` an buying `products`
+
+## Diagon Alley Clients
+
+### Merchant admin
+
+Where the `merchant` creates, updates and deletes `stalls` and `products`, as well as where they manage sales, payments and communication with `customers`.
+
+The `merchant` admin software can be purely clientside, but for `convenience` and uptime, implementations will likely have a server listening for NOSTR events.
+
+### Marketplace
+
+`Marketplace` software should be entirely clientside, either as a stand-alone app, or as a purely frontend webpage. A `customer` subscribes to different merchant NOSTR public keys, and those `merchants` `stalls` and `products` become listed and searchable. The marketplace client is like any other ecommerce site, with basket and checkout. `Marketplaces` may also wish to include a `customer` support area for direct message communication with `merchants`.
+
+## `Merchant` publishing/updating products (event)
+
+NIP-01 https://github.com/nostr-protocol/nips/blob/master/01.md uses the basic NOSTR event type.
+
+The `merchant` event that publishes and updates product lists
+
+ALL fields are optional apart from the `timestamp`. Data from newer events should replace data from older events.
+
+`action` types (used to indicate changes):
+* `update` element has chnaged
+* `delete` element should be deleted
+* `suspend` element is suspended
+* `unsuspend` element is unsuspended
+
+
+```
+{
+ "name":