### Example Product Listing JSON (Kind 30402) Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSON object provides an example structure for a product listing event of kind 30402. It includes the required fields like kind, created_at, content, and essential tags (d, title, price), as well as examples of various optional tags for details, media, physical properties, location, and references. ```JSON { "kind": 30402, "created_at": , "content": "", "tags": [ // Required tags ["d", ""], ["title", ""], ["price", "", "", ""], // Product details ["type", "", ""], // Defaults: simple, digital ["visibility", ""], // Default: on-sale ["stock", ""], // Available quantity ["summary", ""], // Media and specs ["image", "", "", ""], ["spec", "", ""], // Product specifications (e.g., "screen-size", "21 inch"). MAY appear multiple times // Physical properties (for shipping) ["weight", "", ""], // ISO 80000-1 units (g, kg, etc) ["dim", "xx", ""], // ISO 80000-1 units (mm, cm, m) // Location ["location", "
"], ["g", ""], // Classifications ["t", ""], // References ["shipping_option", "<30406|30405>::", ""], // Shipping options or collection, MAY appear multiple times ["a", "30405::"] // Product collection ] } ``` -------------------------------- ### Example: Standard Shipping Option - JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md Illustrates a Kind 30406 event for a standard shipping option, demonstrating configuration with a base price, regional availability, delivery duration, weight/dimension constraints, and per-weight pricing. ```jsonc { "kind": 30406, "created_at": 1703187600, "content": "Standard Regional Shipping", "tags": [ ["d", "standard-regional"], ["title", "Standard Shipping"], ["price", "5.99", "USD"], ["country", "US"], ["region", "US-FL"], ["service", "standard"], ["duration", "24", "72", "H"], // 24-72 hours delivery window ["weight-max", "30", "kg"], ["dim-max", "120x60x60", "cm"], ["price-weight", "0.75", "USD", "kg"] ] } ``` -------------------------------- ### Example: Local Pickup Shipping Option - JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md Provides a concrete example of a Kind 30406 event configured for a local pickup shipping option, including zero price, pickup service type, location details, and geohash. ```jsonc { "kind": 30406, "created_at": 1703187600, "content": "Downtown Store Pickup", "tags": [ ["d", "downtown-pickup"], ["title", "Downtown Store Pickup"], ["price", "0", "USD"], ["country", "US"], ["region", "US-FL"], ["service", "pickup"], ["location", "123 Main St, Downtown, FL"], ["g", "dhwm9c4ws"] ] } ``` -------------------------------- ### Example JSON Structure for Product Collection Event (Kind 30405) Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSON object illustrates the structure of a Nostr event of kind 30405, used for organizing products into collections. It includes required tags like 'd' (identifier), 'title', and 'a' (product references), as well as optional tags for display, location, and shipping options. The 'content' field holds an optional description. ```JSON { "kind": 30405, "created_at": , "content": "", "tags": [ ["d", ""], ["title", ""], ["a", "30402::"], ["image", ""], ["summary", ""], ["location", ""], ["g", ""], ["shipping_option", "30406::"] ] } ``` -------------------------------- ### Payment Receipt Event Structure (Kind 17) - JSON Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md Defines the structure for a Nostr event of kind 17, used by the buyer to confirm payment completion in a marketplace. Includes required tags for merchant public key, subject, order ID, payment proof (with various medium examples), and amount, along with optional content for human-readable details. ```JSON { "kind": 17, "tags": [ // Required tags ["p", ""], ["subject", "order-receipt"], ["order", ""], // Payment proof (one required) ["payment", "", "", ""], ["payment", "lightning", "", ""], ["payment", "bitcoin", "
", ""], ["payment", "ecash", "", ""], ["payment", "fiat", "", ""], // Metadata ["amount", ""] ], "content": "Payment confirmation details" } ``` -------------------------------- ### Shipping Option Event Structure (Kind 30406) - JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md Defines the general structure of the Kind 30406 event for shipping options, detailing the required and optional tags used to specify shipping methods, costs, and constraints. ```jsonc { "kind": 30406, "created_at": , "content": "", "tags": [ // Required tags ["d", ""], ["title", ""], ["price", "", ""], ["country", "", "...", "..."], // Array of country codes ["service", ""], // Extra details ["carrier",""] // Time and Location ["region", "", "...", "..."], // Array of region codes ["duration", "", "", ""], // ISO 8601 duration units (H/D/W) ["location", "
"], ["g", ""], // Constraints ["weight-min", "", ""], ["weight-max", "", ""], ["dim-min", "xx", ""], ["dim-max", "xx", ""], // Price Calculations ["price-weight", "", ""], ["price-volume", "", ""], ["price-distance", "", ""] ] } ``` -------------------------------- ### NIP-17 Order Creation Message (Kind 16, Type 1) JSON Structure Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSON structure represents a NIP-17 kind 16 event with type "1", used by a buyer to initiate an order. It includes required tags for merchant pubkey, subject, type, order ID, amount, and item details, plus optional tags for shipping, address, email, and phone. The content field can contain human-readable notes. ```JSON { "kind": 16, "tags": [ // Required tags ["p", ""], ["subject", ""], ["type", "1"], // Order creation ["order", ""], // Unique order identifier ["amount", ""], // Order items (can repeat) ["item", "30402::", ""], // Shipping details ["shipping", "30406::"], ["address", ""], // Customer contact ["email", ""], // Optional ["phone", ""], // Optional ], "content": "Order notes or special requests" } ``` -------------------------------- ### Product Review Event Structure (Kind 31555) - JSON Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md Specifies the structure for a Nostr event of kind 31555, used for submitting product reviews. It follows NIP-85 and QTS guidelines, requiring tags for product reference ('d') and a primary 'thumb' rating (0-1 score). Optional tags allow for additional category ratings like 'value', 'quality', 'delivery', and 'communication'. ```JSON { "kind": 31555, "created_at": , "tags": [ // Required tags ["d", "a:30402::"], ["rating", "1", "thumb"], // Primary rating // Optional rating categories ["rating", "0.8", "value"], ["rating", "1.0", "quality"], ["rating", "0.6", "delivery"], ["rating", "0.9", "communication"] ], "content": "Detailed review text" } ``` -------------------------------- ### Creating Payment Request Event (Kind 16, Type 2) in JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSONC snippet defines a Nostr event (kind 16, type 2) used by a buyer to request payment from a merchant. It includes required tags like merchant pubkey, subject, type, order ID, and amount, along with optional payment details provided by a service. ```jsonc { "kind": 16, "tags": [ // Required tags ["p", ""], ["subject", "order-payment"], ["type", "2"], // Payment request ["order", ""], ["amount", ""], // Payment details from service ["payment", "lightning", ""], ["payment", "bitcoin", ""], ["payment", "ecash", ""], ], "content": "Service-generated payment details" } ``` -------------------------------- ### NIP-17 Payment Request Message (Kind 16, Type 2) JSON Structure Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSON structure represents a NIP-17 kind 16 event with type "2", sent by a merchant to request payment from a buyer in manual processing mode. It includes required tags for buyer pubkey, subject, type, order ID, and amount, plus optional tags for various payment methods (lightning, bitcoin, ecash) and expiration time. The content field can contain payment instructions. ```JSON { "kind": 16, "tags": [ // Required tags ["p", ""], ["subject", "order-payment"], ["type", "2"], // Payment request ["order", ""], ["amount", ""], // Payment options (can include multiple) ["payment", "lightning", ""], ["payment", "bitcoin", ""], ["ecash", ""], ["expiration", ""], ], "content": "Payment instructions and notes" } ``` -------------------------------- ### Merchant Payment Preference Tag (Kind 0) - JSON Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md Illustrates the structure of the 'payment_preference' tag used within a merchant's Nostr kind 0 profile event. This tag allows the merchant to specify their preferred payment processing method, with options including 'manual', 'ecash', or 'lud16'. If omitted, the default preference is 'manual'. ```JSON ["payment_preference", ""] ``` -------------------------------- ### Sending General Communication Event (Kind 14) in JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSONC snippet illustrates a Nostr event (kind 14) used for general communication between parties involved in an order. It includes required tags for the recipient's pubkey and an optional subject tag (often the order ID), with the message content in the 'content' field. ```jsonc { "kind": 14, "tags": [ // Required tags ["p", ""], ["subject", ""], // Optional, can be empty ], "content": "General communication message" } ``` -------------------------------- ### Sending Shipping Update Event (Kind 16, Type 4) in JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSONC snippet defines a Nostr event (kind 16, type 4) used by a merchant to provide shipping updates to a buyer. It includes required tags for the buyer's pubkey, subject, type, order ID, and shipping status, along with optional tags for tracking number, carrier, and estimated time of arrival. ```jsonc { "kind": 16, "tags": [ // Required tags ["p", ""], ["subject", "shipping-info"], ["type", "4"], // Shipping update ["order", ""], // Shipping details ["status", ""], // processing|shipped|delivered|exception ["tracking", ""], ["carrier", ""], ["eta", ""], ], "content": "Shipping status and tracking information" } ``` -------------------------------- ### Sending Order Status Update Event (Kind 16, Type 3) in JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSONC snippet represents a Nostr event (kind 16, type 3) sent by a merchant to a buyer to update the status of an order. It includes required tags for the buyer's pubkey, subject, type, and order ID, along with the current order status tag. ```jsonc { "kind": 16, "tags": [ // Required tags ["p", ""], ["subject", "order-info"], ["type", "3"], // Status update ["order", ""], // Status information ["status", ""], // pending|confirmed|processing|completed|cancelled ], "content": "Human readable status update" } ``` -------------------------------- ### Sending Order Cancellation Event (Kind 16, Type 3) in JSONC Source: https://github.com/gammamarkets/market-spec/blob/main/spec.md This JSONC snippet shows a Nostr event (kind 16, type 3) sent by a buyer to a merchant to cancel an order. It includes required tags for the merchant's pubkey, subject, type, and order ID, with the status tag specifically set to 'cancelled'. ```jsonc { "kind": 16, "tags": [ // Required tags ["p", ""], ["subject", "order-info"], ["type", "3"], // Status update ["order", ""], // Status information ["status", ""], // cancelled ], "content": "Human readable status update" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.