From 0e30f7a697e44e4ec3f93c4bfed5bc20c54ca8ae Mon Sep 17 00:00:00 2001 From: woikos Date: Wed, 14 Jan 2026 17:16:57 +0100 Subject: [PATCH] feat: add NIP-99/Gamma Markets kind categories for curating mode Add marketplace_nip99 category with Plebeian Market event kinds: - 30402 (Products) - 30403 (Orders - legacy) - 30405 (Collections) - 30406 (Shipping options) - 31555 (Product reviews) Add order_communication category for Gamma Markets (kinds 16, 17). Rename existing marketplace category to marketplace_nip15 for clarity while keeping backward compatibility with the legacy alias. Co-Authored-By: Claude Opus 4.5 --- app/handle-nip86-curating.go | 18 +++++++++++++++--- app/web/src/kindCategories.js | 18 +++++++++++++++--- pkg/database/curating-acl.go | 19 +++++++++++-------- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/app/handle-nip86-curating.go b/app/handle-nip86-curating.go index 701c5bb..a047449 100644 --- a/app/handle-nip86-curating.go +++ b/app/handle-nip86-curating.go @@ -531,11 +531,23 @@ func GetKindCategoriesInfo() []map[string]interface{} { "kinds": []int{1063, 20, 21, 22}, }, { - "id": "marketplace", - "name": "Marketplace", - "description": "Product listings, stalls, auctions", + "id": "marketplace_nip15", + "name": "Marketplace (NIP-15)", + "description": "Legacy NIP-15 stalls and products", "kinds": []int{30017, 30018, 30019, 30020, 1021, 1022}, }, + { + "id": "marketplace_nip99", + "name": "Marketplace (NIP-99/Gamma)", + "description": "NIP-99 classified listings, collections, shipping, reviews (Plebeian Market)", + "kinds": []int{30402, 30403, 30405, 30406, 31555}, + }, + { + "id": "order_communication", + "name": "Order Communication", + "description": "Gamma Markets order messages and payment receipts", + "kinds": []int{16, 17}, + }, { "id": "groups_nip29", "name": "Group Messaging (NIP-29)", diff --git a/app/web/src/kindCategories.js b/app/web/src/kindCategories.js index f79b2e2..a27b173 100644 --- a/app/web/src/kindCategories.js +++ b/app/web/src/kindCategories.js @@ -30,11 +30,23 @@ export const curationKindCategories = [ kinds: [1063, 20, 21, 22], }, { - id: "marketplace", - name: "Marketplace", - description: "Product listings, stalls, and marketplace events", + id: "marketplace_nip15", + name: "Marketplace (NIP-15)", + description: "Legacy NIP-15 stalls and products", kinds: [30017, 30018, 30019, 30020], }, + { + id: "marketplace_nip99", + name: "Marketplace (NIP-99/Gamma)", + description: "NIP-99 classified listings, collections, shipping, reviews (Plebeian Market)", + kinds: [30402, 30403, 30405, 30406, 31555], + }, + { + id: "order_communication", + name: "Order Communication", + description: "Gamma Markets order messages and payment receipts (kinds 16, 17)", + kinds: [16, 17], + }, { id: "groups_nip29", name: "Group Messaging (NIP-29)", diff --git a/pkg/database/curating-acl.go b/pkg/database/curating-acl.go index 713f29b..1ccad72 100644 --- a/pkg/database/curating-acl.go +++ b/pkg/database/curating-acl.go @@ -965,14 +965,17 @@ func kindInRange(kind int, rangeStr string) bool { // kindInCategory checks if a kind belongs to a predefined category func kindInCategory(kind int, category string) bool { categories := map[string][]int{ - "social": {0, 1, 3, 6, 7, 10002}, - "dm": {4, 14, 1059}, - "longform": {30023, 30024}, - "media": {1063, 20, 21, 22}, - "marketplace": {30017, 30018, 30019, 30020, 1021, 1022}, - "groups_nip29": {9, 10, 11, 12, 9000, 9001, 9002, 39000, 39001, 39002}, - "groups_nip72": {34550, 1111, 4550}, - "lists": {10000, 10001, 10003, 30000, 30001, 30003}, + "social": {0, 1, 3, 6, 7, 10002}, + "dm": {4, 14, 1059}, + "longform": {30023, 30024}, + "media": {1063, 20, 21, 22}, + "marketplace": {30017, 30018, 30019, 30020, 1021, 1022}, // Legacy alias + "marketplace_nip15": {30017, 30018, 30019, 30020, 1021, 1022}, + "marketplace_nip99": {30402, 30403, 30405, 30406, 31555}, // NIP-99/Gamma Markets (Plebeian Market) + "order_communication": {16, 17}, // Gamma Markets order messages + "groups_nip29": {9, 10, 11, 12, 9000, 9001, 9002, 39000, 39001, 39002}, + "groups_nip72": {34550, 1111, 4550}, + "lists": {10000, 10001, 10003, 30000, 30001, 30003}, } kinds, ok := categories[category]