# Sparkle Protocol Technical Specification Version 1.0 – January 2025 --- ## Abstract Sparkle Protocol is a metaprotocol for Bitcoin Ordinals enabling cost-efficient NFT collections through recursive parent-child inscription architecture. This specification defines the JSON metadata format, inscription patterns, and composition rules for Sparkle-compatible NFTs. --- ## Protocol Identifier All Sparkle inscriptions use: ```json {"p": "sparkle", "v": 1} ``` - `p` (protocol): Always `"sparkle"` - `v` (version): Protocol version number (currently `1`) --- ## Operations ### 1. Deploy (Collection Genesis) Defines a new NFT collection. ```json { "p": "sparkle", "v": 1, "op": "deploy", "name": "Collection Name", "collection": { "supply": 10000, "trait_count": 176, "description": "Collection description", "license": "CC0-1.0" } } ``` **Required fields:** - `p`, `v`, `op`, `name` **Optional fields:** - `collection` (object): Collection metadata - `lightning` (object): Lightning trading metadata (future use) ### 2. Mint (Individual NFT) Creates an individual NFT referencing traits. ```json { "p": "sparkle", "v": 1, "op": "mint", "parent": "", "nft": { "id": 1, "name": "NFT #0001" }, "layers": [ {"id": "", "z": 0}, {"id": "", "z": 1} ] } ``` **Required fields:** - `p`, `v`, `op`, `parent`, `layers` **Optional fields:** - `nft` (object): NFT metadata --- ## Composition Rules ### Layer Rendering NFTs are composed by: 1. Parsing the `layers` array 2. Fetching each trait image by inscription ID 3. Drawing layers in ascending z-index order (0 = back, higher = front) 4. Compositing on a canvas (recommended: 1024×1024px) ### Inscription ID Format Inscription IDs follow Ordinals standard: ``` i ``` Example: `3b19f7c514ca61cde03a8ff6ca694209ac60e3c73f7e62d0c9b2e7442f9ed57bi0` --- ## See Also - [DARKITA Integration](./DARKITA_INTEGRATION.md) for real-world implementation - [API Usage](./API_USAGE.md) for integration guide - [Website Technical Spec](https://sparkleprotocol.com/technical-reality.html) for detailed analysis --- **TODO:** This spec will be expanded with full formal specification in future versions.