{"id":"913d765ab8f7c1b09855c7249fbf8ccd2e2cce2e19137be82c6b9e6d499d1d29","pubkey":"86184109eae937d8d6f980b4a0b46da4ef0d983eade403ee1b4c0b6bde238b47","created_at":1753307713,"kind":30817,"tags":[["d","magic-the-gathering-decks"],["title","Magic: The Gathering Decks"],["client","nostrhub.io"]],"content":"NIP-MG\n======\n\nMagic: The Gathering Decks\n--------------------------\n\n`draft` `optional`\n\nThis NIP defines `kind:37381` events for storing Magic: The Gathering deck lists. These events allow players to share, store, and discover MTG decks on the Nostr protocol.\n\n## Event Structure\n\n### Kind\n\n`37381` - Magic: The Gathering Deck\n\n### Tags\n\n- `d` (required): Unique identifier for the deck\n- `title` (required): Human-readable name of the deck\n- `C` (optional, multiple): Card name of the commander(s) (for Commander format decks)\n- `S` (optional): Card name of the companion\n- `b` (optional, multiple): Sideboard card entries in the format `[\"b\", \"name\", \"quantity\", \"set_id\", \"art_id\", \"lang\", \"foil\"]`\n- `banner` (optional): URL to featured artwork representing the deck\n- `t` (optional): Format tags (e.g., \"standard\", \"modern\", \"commander\", \"legacy\") and other deck attributes\n- `c` (required, multiple): Card entries in the format `[\"c\", \"name\", \"quantity\", \"set_id\", \"art_id\", \"lang\", \"foil\"]`\n- `alt` (recommended): Human-readable description of the deck for accessibility (NIP-31)\n\n### Card Tag Format\n\nEach card in the deck is represented by a `c` tag with the following structure:\n\n```\n[\"c\", \"name\", \"quantity\", \"set_id\", \"art_id\", \"lang\", \"foil\"]\n```\n\nWhere:\n- `name` (string, required): The exact card name as it appears on the card\n- `quantity` (string, required): Number of copies of this card in the deck\n- `set_id` (string, optional): The set identifier (e.g., \"MID\", \"VOW\", \"NEO\"), can be empty string \"\"\n- `art_id` (string, optional): Unique identifier for the specific artwork variant, can be empty string \"\"\n- `lang` (string, optional): The two-letter ISO 639-1 language code (e.g., \"en\", \"es\", \"fr\", \"ja\", \"ko\", \"ru\", \"zhs\", \"zht\").\n- `foil` (string, optional): \"foil\" if the card is foil, considered not foil otherwise\n\n### Sideboard Tag Format\n\nEach card in the sideboard is represented by a `b` tag with the same structure as the `c` tag:\n\n```\n[\"b\", \"name\", \"quantity\", \"set_id\", \"art_id\", \"lang\", \"foil\"]\n```\n\n### Content\n\nThe `content` field SHOULD be empty (`\"\"`) as all deck information is stored in tags for efficient querying.\n\n## Examples\n\n### Modern Deck with Sideboard\n\n```json\n{\n  \"kind\": 37381,\n  \"content\": \"\",\n  \"tags\": [\n    [\"d\", \"modern-burn-deck\"],\n    [\"title\", \"Modern Burn\"],\n    [\"alt\", \"Magic: The Gathering Deck - Modern Burn\"],\n    [\"banner\", \"https://example.com/burn-art.jpg\"],\n    [\"t\", \"modern\"],\n    [\"t\", \"aggro\"],\n    [\"t\", \"burn\"],\n    [\"c\", \"Lightning Bolt\", \"4\", \"M21\", \"162\", \"en\", \"\"],\n    [\"c\", \"Monastery Swiftspear\", \"4\", \"KTK\", \"118\", \"en\", \"\"],\n    [\"c\", \"Goblin Guide\", \"4\", \"ZEN\", \"126\", \"en\", \"true\"],\n    [\"c\", \"Mountain\", \"20\", \"\", \"\", \"en\", \"\"],\n    [\"b\", \"Smash to Smithereens\", \"3\", \"M15\", \"163\", \"en\", \"\"],\n    [\"b\", \"Kor Firewalker\", \"2\", \"M11\", \"22\", \"en\", \"\"]\n  ]\n}\n```\n\n### Commander Deck with Partners\n\n```json\n{\n  \"kind\": 37381,\n  \"content\": \"\",\n  \"tags\": [\n    [\"d\", \"tymna-kraum-deck\"],\n    [\"title\", \"Tymna and Kraum\"],\n    [\"alt\", \"Magic: The Gathering Deck - Tymna and Kraum\"],\n    [\"C\", \"Tymna the Weaver\"],\n    [\"C\", \"Kraum, Ludevic's Opus\"],\n    [\"banner\", \"https://example.com/partner-art.jpg\"],\n    [\"t\", \"commander\"],\n    [\"t\", \"cedh\"],\n    [\"c\", \"Tymna the Weaver\", \"1\", \"C16\", \"48\", \"en\", \"\"],\n    [\"c\", \"Kraum, Ludevic's Opus\", \"1\", \"C16\", \"34\", \"en\", \"\"],\n    [\"c\", \"Force of Will\", \"1\", \"2XM\", \"51\", \"en\", \"true\"]\n  ]\n}\n```\n\n### Commander Deck\n\n```json\n{\n  \"kind\": 37381,\n  \"content\": \"\",\n  \"tags\": [\n    [\"d\", \"my-dragon-deck\"],\n    [\"title\", \"Ur-Dragon Tribal\"],\n    [\"alt\", \"Magic: The Gathering Deck - Ur-Dragon Tribal\"],\n    [\"C\", \"The Ur-Dragon\"],\n    [\"S\", \"Jegantha, the Wellspring\"],\n    [\"banner\", \"https://example.com/ur-dragon-art.jpg\"],\n    [\"t\", \"commander\"],\n    [\"t\", \"tribal\"],\n    [\"t\", \"dragons\"],\n    [\"c\", \"The Ur-Dragon\", \"1\", \"C17\", \"1\", \"en\", \"\"],\n    [\"c\", \"Dragonlord Ojutai\", \"1\", \"DTK\", \"42\", \"ja\", \"true\"],\n    [\"c\", \"Lightning Bolt\", \"1\", \"M21\", \"162\", \"en\", \"\"],\n    [\"c\", \"Command Tower\", \"1\", \"C21\", \"284\", \"en\", \"\"]\n  ]\n}\n```\n\n## Client Behavior\n\n### Publishing\n\nClients SHOULD:\n- Validate that card names exist in official MTG databases\n- Ensure deck legality for the specified format(s) when possible\n- Use consistent set identifiers (preferably official Wizards of the Coast set codes)\n- Include appropriate `t` tags for format and archetype classification\n- Include a [NIP-31](https://github.com/nostr-protocol/nips/blob/master/31.md) `alt` tag with a human-readable description of the deck for accessibility and compatibility with clients that don't support kind 37381\n- If `lang` is empty or missing, clients should default to the client's language.\n\n### Querying\n\nClients can efficiently query decks by:\n- Format: `{\"kinds\": [37381], \"#t\": [\"commander\"]}`\n- Card inclusion (main deck): `{\"kinds\": [37381], \"#c\": [\"Lightning Bolt\"]}`\n- Card inclusion (sideboard): `{\"kinds\": [37381], \"#b\": [\"Kor Firewalker\"]}`\n- Commander: `{\"kinds\": [37381], \"#C\": [\"The Ur-Dragon\", \"Tymna the Weaver\"]}`\n- Companion: `{\"kinds\": [37381], \"#S\": [\"Jegantha, the Wellspring\"]}`\n- Author's decks: `{\"kinds\": [37381], \"authors\": [\"pubkey\"]}`\n\n### Display\n\nClients SHOULD:\n- Display the deck title prominently\n- Show the commander and companion separately for relevant format decks\n- Group cards by type (creatures, spells, lands, etc.) when displaying\n- Display the sideboard separately from the main deck\n- Indicate foil cards with appropriate visual styling\n- Show banner artwork when available","sig":"d04efeeefa45bff38f0edda3e14a3c700a59f38c59bff2d0b6fe82f2d79a630c442e2b320ca8c42e1c23db9946bf77637df28ae2a6328551ce00f20d91f05982"}