Skip to main content

MerkleTreeLocalStorage 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.

Merkle tree storage that uses browser local storage

MerkleTreeLocalStorage implements IMerkleTreeStorage interface

Signature:

export declare class MerkleTreeLocalStorage implements IMerkleTreeStorage 

Implements: IMerkleTreeStorage

Constructors

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

Properties

PropertyModifiersTypeDescription
storageKeyMeta

static

readonly

(not declared)

key for the storage key metadata

Methods

MethodModifiersDescription
addToMerkleTree(identifier, mtType, hindex, hvalue)adds to merkle tree in the local storage
bindMerkleTreeToNewIdentifier(oldIdentifier, newIdentifier)binds merkle tree in the local storage to the new identifiers
createIdentityMerkleTrees(identifier)creates a tree in the local storage
getIdentityMerkleTreesInfo(identifier)getIdentityMerkleTreesInfo from the local storage
getMerkleTreeByIdentifierAndType(identifier, mtType)get merkle tree from the local storage