import { type Hex } from 'viem'; /** Hash an ordered pair after sorting: keccak256(min || max). */ export declare function hashPair(a: Hex, b: Hex): Hex; /** * Leaf hash for a descriptor commitment. Double-hash (`keccak256(keccak256(c))`) * to domain-separate leaves from internal nodes (second-preimage resistance). */ export declare function leafHash(descriptorCommitment: Hex): Hex; export interface CorpusTree { root: Hex; /** layers[0] = leaves, layers[n] = [root]. */ layers: Hex[][]; } /** * Build a Merkle tree over already-hashed leaves (see {@link leafHash}). An odd * node at any level is promoted unchanged to the next level. Empty input yields * the zero root. */ export declare function buildCorpusTree(leaves: Hex[]): CorpusTree; /** Convenience: root of a fresh tree over `leaves`. */ export declare function merkleRoot(leaves: Hex[]): Hex; /** * Inclusion proof (sibling path) for the leaf at `index`. Promoted (odd) nodes * contribute no sibling at that level — matching {@link buildCorpusTree}. */ export declare function merkleProof(tree: CorpusTree, index: number): Hex[]; /** Fold a leaf with its proof and compare against the root. */ export declare function verifyInclusion(leaf: Hex, proof: Hex[], root: Hex): boolean; //# sourceMappingURL=merkle.d.ts.map