Class MerkleTree

Hierarchy

  • MerkleTree

Constructors

  • Parameters

    • Optional options: {
          db?: Database;
          preHashedLeaf?: boolean;
      }
      • Optional db?: Database
      • Optional preHashedLeaf?: boolean

    Returns MerkleTree

Properties

_db: Database
_hashToValueMap: PrefixStore
_locationToHashMap: PrefixStore
_preHashedLeaf: boolean
_root: Buffer
_size: number = 0

Accessors

Methods

  • Parameters

    • leftHashBuffer: Buffer
    • rightHashBuffer: Buffer
    • layerIndex: number
    • nodeIndex: number

    Returns Promise<NodeData>

  • Parameters

    • value: Buffer
    • nodeIndex: number

    Returns Promise<NodeData>

  • Parameters

    • queryHashes: readonly Buffer[]

    Returns Promise<number[]>

  • Parameters

    • hashValue: Buffer
    • level: number = 1

    Returns Promise<string>

  • Parameters

    • queryData: readonly Buffer[]

    Returns Promise<Proof>

  • Parameters

    • idxs: number[]
    • updateData: readonly Buffer[]

    Returns Promise<Buffer>

Generated using TypeDoc