UNPKG

ontology-ts-sdk

Version:

Comprehensive TypeScript library for the Ontology blockchain.

8 lines (7 loc) 731 B
import { ClaimProof } from './claim/claimProof'; export declare function verifyLeafHashInclusion(leafHash: string, leafIndex: number, proof: string[], rootHash: string, treeSize: number): boolean; export declare function calculateRootHashFromAuditPath(leafHash: string, leafIndex: number, proof: string[], treeSize: number): string; export declare function hashChildren(left: string, right: string): string; export declare function getProofNodes(leafIndex: number, treeSize: number, proof: string[]): any[]; export declare function constructMerkleProof(restUrl: string, txHash: string, contractAddr: string): Promise<ClaimProof>; export declare function verifyClaimProof(txHash: string, merkleRoot: string, nodes: any[]): boolean;