Skip to main content

InMemoryMerkleTreeStorage class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

InMemoryMerkleTreeStorage implements IMerkleTreeStorage interface

Signature:

export declare class InMemoryMerkleTreeStorage implements IMerkleTreeStorage 

Implements: IMerkleTreeStorage

Constructors

ConstructorModifiersDescription
(constructor)(_mtDepth)Creates an instance of InMemoryMerkleTreeStorage.

Properties

PropertyModifiersTypeDescription
_data{ [v in string]: TreeWithMetaInfo[]; }

key value storage for trees where key is identifier

{{ [v in string]: TreeWithMetaInfo[]; }}

mtDepthnumber

tree depth

{number}

Methods

MethodModifiersDescription
addToMerkleTree(identifier, mtType, hindex, hvalue)adds entry to merkle tree in the memory
bindMerkleTreeToNewIdentifier(oldIdentifier, newIdentifier)bind merkle tree identifier in memory
createIdentityMerkleTrees(identifier)create trees in the memory
getIdentityMerkleTreesInfo(identifier)get trees meta info from the memory
getMerkleTreeByIdentifierAndType(identifier, mtType)get merkle tree by identifier and type from memory