incubed
Version:
Typescript-version of the incubed client
13 lines (12 loc) • 634 B
TypeScript
/**
* Verifies a Merkle Proof.
* @param rootHash the rootHash of the Trie
* @param path the path to proof
* @param proof the serialized nodes
* @param expectedValue expected value, if null, this function verifies for non existing node.
* @param errorMsg the error message that should be used in case of not verifiable.
*
* The function will return the value of the last node if it was successfull or throw otherwise.
*/
export default function verify(rootHash: Buffer, path: Buffer, proof: Buffer[], expectedValue: Buffer, errorMsg?: string): Promise<Buffer>;
export declare function stringToNibbles(bkey: Buffer): number[];