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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)",
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user