Class CompactDeepSparseMerkleSubTree<K, V>

This is used to compute new roots for state transitions based on sideNodes.

CompactSparseMerkleTree

Type Parameters

  • K
  • V

Hierarchy (view full)

Constructors

  • Creates an instance of CompactDeepSparseMerkleSubTree.

    Type Parameters

    • K
    • V

    Parameters

    • store: Store<V>
    • root: Field
    • keyType: Provable<K>
    • valueType: Provable<V>
    • Optional options: {
          hashKey?: boolean;
          hashValue?: boolean;
          hasher?: Hasher;
      } = ...

      hasher: The hash function to use, defaults to PoseidonHasherFunc; hashKey: whether to hash the key, the default is true; hashValue: whether to hash the value, the default is true.

      • Optional hashKey?: boolean
      • Optional hashValue?: boolean
      • Optional hasher?: Hasher

    Returns CompactDeepSparseMerkleSubTree<K, V>

    Memberof

    CompactDeepSparseMerkleSubTree

Properties

config: {
    hashKey: boolean;
    hashValue: boolean;
}

Type declaration

  • hashKey: boolean
  • hashValue: boolean
keyType: Provable<K>
root: Field
store: Store<V>
th: TreeHasher<K, V>
valueType: Provable<V>

Methods

  • Import a compacted sparse merkle tree

    Type Parameters

    • K
    • V

    Parameters

    • store: Store<V>
    • keyType: Provable<K>
    • valueType: Provable<V>
    • Optional options: {
          hashKey?: boolean;
          hashValue?: boolean;
          hasher?: Hasher;
      } = ...

      hasher: The hash function to use, defaults to PoseidonHasherFunc; hashKey: whether to hash the key, the default is true; hashValue: whether to hash the value, the default is true.

      • Optional hashKey?: boolean
      • Optional hashValue?: boolean
      • Optional hasher?: Hasher

    Returns Promise<CompactSparseMerkleTree<K, V>>

    {Promise<CompactSparseMerkleTree<K, V>>}

    Static

    Memberof

    CompactSparseMerkleTree