UNPKG

postchain-client

Version:

Client library for accessing a Postchain node through REST.

37 lines (36 loc) 1.56 kB
/** * Calculates the merkle root hash of the structure. * * @param {any} value * @param {MerkleHashCalculator} calculator describes the method we use for hashing and serialization * @return the merkle root hash (32 bytes) of the data structure. */ export function merkleHash(value: any, calculator: MerkleHashCalculator, merkleHashVersion: any): Buffer; /** * * @param {MerkleProofTree} tree * @param {MerkleHashCalculator} calculator */ export function merkleTreeHash(tree: MerkleProofTree, calculator: MerkleHashCalculator, merkleHashVersion: any): Buffer; /** * Calculates the merkle root hash of the structure * * @param {any} value * @param {MerkleHashCalculator} calculator describes the method we use for hashing and serialization * @return the merkle root hash summary */ export function merkleHashSummary(value: any, calculator: MerkleHashCalculator, merkleHashVersion: any): import("./merklehashcarrier").MerkleHashSummary; /** * * @param {any} value * @param {PathSet} pathSet * @param {MerkleHashCalculator} calculator * @param {number} merkleHashVersion */ export function generateProof(value: any, pathSet: PathSet, calculator: MerkleHashCalculator, merkleHashVersion: number): MerkleProofTree; import MerkleHashCalculator_1 = require("../merklehashcalculator"); import MerkleHashCalculator = MerkleHashCalculator_1.MerkleHashCalculator; import MerkleProofTree_1 = require("./merkleprooftree"); import MerkleProofTree = MerkleProofTree_1.MerkleProofTree; import PathSet_1 = require("../path"); import PathSet = PathSet_1.PathSet;