import type { GlobalTeleportProof, IndexedEvent } from "../types.js"; /** * Merkle proof verification utilities for zERC20 teleport flows. * @remarks * - Hashing uses Poseidon over the BN254 scalar field. * - Inputs that exceed the BN254 field modulus are rejected to avoid invalid circuit assumptions. * - All hex strings are normalized via {@link normalizeHex} before conversion. */ declare const BN254_FIELD_MODULUS: bigint; export declare function computeLeafHash(fromAddressHex: string, toAddressHex: string, value: bigint | number | string): bigint; /** * Compute a Merkle root given a leaf value, siblings, and leaf index. * @param params.leaf - Leaf field element value. * @param params.siblings - Sibling field elements as hex strings (bottom-up). * @param params.leafIndex - Leaf index (0-based). * @throws If `leafIndex` is negative or any field element is invalid/out-of-field. */ export declare function computeMerkleRootFromSiblings(params: { leaf: bigint; siblings: readonly string[]; leafIndex: bigint | number; }): bigint; /** * Verify that the provided global teleport proofs match the expected aggregation root. * @remarks * This verifies: * - `events.length === proofs.length` (pairs correspond by index) * - each `(event, proof)` pair hashes to a Merkle root equal to `aggregationRoot` * * @throws If lengths mismatch, any input is invalid, or a proof does not match the aggregation root. */ export declare function verifyGlobalTeleportProofs(args: { aggregationRoot: string; events: readonly IndexedEvent[]; proofs: readonly GlobalTeleportProof[]; }): void; /** * BN254 scalar field modulus used by Poseidon hashing and field checks. */ export { BN254_FIELD_MODULUS }; //# sourceMappingURL=merkle.d.ts.map