Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

MerkleTreeProof: { leaf: Buffer; leafIndex: number; proof: Buffer[]; root: Buffer }

Type declaration

  • leaf: Buffer
  • leafIndex: number
  • proof: Buffer[]
  • root: Buffer
TreeNode: { id: number; left: TreeNode | undefined; level: number; node: Buffer; parent: TreeNode | undefined; right: TreeNode | undefined }

Type declaration

Variables

LEAF_BUFFER_LENGTH: number = 32

Functions

  • emptyNode(level: number): Buffer
  • Creates the leaf node in a tree of empty leaves of height level. Uses {@link CACHE_EMPTY_NODE} to efficiently produce

    Parameters

    • level: number

    Returns Buffer

  • hash(left: Buffer, right: Buffer): Buffer

Generated using TypeDoc