Collections
Curated NFT collections with optional merkle proof enforcement
Overview
Creating a Collection
data:image/png;rule=esip6;p=erc-721-ethscriptions-collection;op=create_collection_and_add_self;d=<base64-json>;base64,<image-bytes>{
"metadata": {
"name": "My Collection",
"symbol": "MYC",
"max_supply": "100",
"description": "A curated collection of digital artifacts",
"logo_image_uri": "",
"banner_image_uri": "",
"background_color": "",
"website_link": "https://example.com",
"twitter_link": "myhandle",
"discord_link": "https://discord.gg/...",
"merkle_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"initial_owner": "0x1234567890abcdef1234567890abcdef12345678"
},
"item": {
"item_index": "0",
"name": "Item #1",
"background_color": "#FF0000",
"description": "The first item in the collection",
"attributes": [
{ "trait_type": "Rarity", "value": "Legendary" },
{ "trait_type": "Color", "value": "Red" }
],
"merkle_proof": []
}
}Metadata Object Fields
Field
Description
Item Object Fields
Field
Description
Adding Items to a Collection
Merkle Proof Enforcement
How It Works
Merkle Leaf Computation
Merkle Tree Structure
Pair Hashing
Adding Items with Proofs
Owner Bypass
Example: Creating a Merkle-Enforced Collection
Item
Index
Added By
Merkle Proof Required?
Step 1: Compute Content Hashes
Step 2: Build Merkle Leaves
Step 3: Compute Merkle Root
Step 4: Create Collection (Owner)
Step 5: Add Items (Non-Owner)
Operations Reference
Operation
Description
Editing Collections
Editing Items
Removing Items
Transferring Ownership
Renouncing Ownership
Locking Collections
Error Handling
Error
Cause
Security Considerations
Generating Merkle Trees (TypeScript)
Dependencies
Helper Functions
Complete Example
Sending Transactions
Last updated