@chainsafe/persistent-merkle-tree
Version:
Merkle tree implemented as a persistent datastructure
22 lines (21 loc) • 1.23 kB
TypeScript
import type { HashComputationLevel } from "../hashComputation.ts";
import { Hasher } from "./types.ts";
export * from "./types.ts";
export * from "./util.ts";
/**
* Hasher used across the SSZ codebase, by default, this does not support batch hash.
*/
export declare let hasher: Hasher;
/**
* Set the hasher to be used across the SSZ codebase
*
* WARNING: This function is intended for power users and must be executed before any other SSZ code is imported
*/
export declare function setHasher(newHasher: Hasher): void;
export declare function hashInto(data: Uint8Array, output: Uint8Array): void;
export declare function digest64(a: Uint8Array, b: Uint8Array): Uint8Array;
export declare function digest64Into(a: Uint8Array, b: Uint8Array, output: Uint8Array): void;
export declare function digestNLevel(data: Uint8Array, nLevel: number): Uint8Array;
export declare function merkleizeBlocksBytes(blocksBytes: Uint8Array, padFor: number, output: Uint8Array, offset: number): void;
export declare function merkleizeBlockArray(blocks: Uint8Array[], blockLimit: number, padFor: number, output: Uint8Array, offset: number): void;
export declare function executeHashComputations(hashComputations: HashComputationLevel[]): void;