upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Gardner <202880+erskingardner@users.noreply.github.com>2023-07-13 15:14:19 +0200
committerJeff Gardner <202880+erskingardner@users.noreply.github.com>2023-07-13 15:14:19 +0200
commit451c06a3c572a13afe45c1d80616f8e6dd9bb1de (patch)
treecef573d51c67c6ce4b63a5ed1ca8cb2387cedeea
parent0b08cf545b50b4799000e90aa4c5ada2cb73ca62 (diff)
Add initial draft for classifieds NIP
-rw-r--r--402.md71
1 files changed, 71 insertions, 0 deletions
diff --git a/402.md b/402.md
new file mode 100644
index 0000000..c0eee14
--- /dev/null
+++ b/402.md
@@ -0,0 +1,71 @@
1# NIP-402
2
3## Classifieds
4
5`draft` `optional` `author:erskingardner`
6
7This NIP defines `kind:30402`: a parameterized replaceable event to describe classified listings that list any arbitrary product, service, or other thing for sale or offer and includes enough structured metadata to make them useful.
8
9The category of classifieds includes a very broad range of physical goods, services, work opportunities, rentals, free giveaways, personals, etc. and is distinct from the more strictly structured marketplaces defined in [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) that often sell many units of specific products through very specific channels.
10
11The structure of these events is very similar to [NIP-23](https://github.com/nostr-protocol/nips/blob/master/23.md) long-form content events.
12
13### Draft / Inactive Listings
14
15`kind:30403` has the same structure as `kind:30402` and is used to save draft or inactive classified listings.
16
17### Content
18
19The `.content` field should be a description of what is being offered and by whom. These events should be a string in Markdown syntax.
20
21### Author
22
23The `.pubkey` field of these events are treated as the party creating the listing.
24
25### Metadata
26
27- For "tags"/"hashtags" (i.e. categories or keywords of relevance for the listing) the `"t"` event tag should be used, as per [NIP-12](https://github.com/nostr-protocol/nips/blob/master/12.md).
28
29The following tags, used for structured metadata, are standardized and SHOULD be included. Other tags may be added as necessary.
30
31- `"title"`, a title for the listing
32- `"summary"`, for short tagline or summary for the listing
33- `"published_at"`, for the timestamp (in unix seconds – converted to string) of the first time the listing was published.
34- `"location"`, for the location.
35- `"price"`, for the price of the thing being listed. This is a free-form string. e.g. `€2,000/week` or `$22 per hour` or `$500`
36
37Other standard tags that might be useful.
38
39- `"g"`, a geohash for more precise location
40
41## Example Event
42
43```json
44{
45 "kind": 30402,
46 "created_at": 1675642635,
47 // Markdown content
48 "content": "Lorem [ipsum][nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu.",
49 "tags": [
50 ["d", "lorem-ipsum"],
51 ["title", "Lorem Ipsum"],
52 ["published_at", "1296962229"],
53 ["t", "electronics"],
54 ["summary", "More lorem ipsum that is a little more than the title"],
55 ["location", "NYC"],
56 ["price", "$100"],
57 [
58 "e",
59 "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87",
60 "wss://relay.example.com"
61 ],
62 [
63 "a",
64 "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum",
65 "wss://relay.nostr.org"
66 ]
67 ],
68 "pubkey": "...",
69 "id": "..."
70}
71```