UNPKG

@dcl/content-hash-tree

Version:

Lib to generate and validate a merkle tree of content hashes

7 lines (6 loc) 438 B
/// <reference types="node" /> import { BigNumber } from 'ethers'; import { MerkleDistributorInfo } from './types'; export declare function generateTree(contentHashes: string[]): MerkleDistributorInfo; export declare function verifyProof(index: BigNumber | number, contentHash: string, proof: Buffer[], root: Buffer): boolean; export declare function generateRoot(index: BigNumber | number, contentHash: string, proof: Buffer[]): Buffer;