Meta Merkles
The MetaMerklesSDK manages Meta Merkles — an on-chain merkle tree metadata storage contract that other contracts can ingest. Its primary use is decentralizing royalties across the marketplace, auction, and raffle systems.
Concepts
Section titled “Concepts”How It Works
Section titled “How It Works”Instead of storing metadata for every individual asset on-chain (expensive), Meta Merkles:
- Groups asset metadata (including royalty splits) into a merkle tree
- Stores only the merkle root on-chain
- Allows anyone to verify an asset’s metadata by providing a merkle proof
Marketplace, auction, and raffle contracts verify royalty information on-chain through MetaMerkles proofs, ensuring creators receive their royalties without relying on off-chain metadata.
Initialization
Section titled “Initialization”import { MetaMerklesSDK } from '@akta/sdk/meta-merkles'
const metaMerkles = new MetaMerklesSDK({ algorand })Tree Builder
Section titled “Tree Builder”The SDK includes a tree builder utility for constructing merkle trees:
import { MerkleTree } from '@akta/sdk/meta-merkles'Key Features
Section titled “Key Features”- Efficient storage — Only merkle roots stored on-chain
- Verifiable — Anyone can verify metadata with a proof
- Batch updates — Update metadata for entire groups at once
- SDK tree builder — Built-in utility for constructing trees