tupelo-wasm-sdk

Home > tupelo-wasm-sdk > ChainTree

ChainTree class

ChainTree is the main class used for interacting with the data of Tupelo. See https://docs.quorumcontrol.com/docs/chaintree.html for a detailed description of what a ChainTree is.

Signature:

export declare class ChainTree extends Dag 

Constructors

Constructor Modifiers Description
(constructor)(opts)   Creates a new ChainTree

Properties

Property Modifiers Type Description
key   EcdsaKey  
newEmptyTree static (store: IBlockService, key: EcdsaKey) => Promise<ChainTree> Creates a new empty chaintree using the specified key and blockservice.
store   IBlockService  

Methods

Method Modifiers Description
id()   Returns the DID of the ChainTree
resolveData(path)   resolveData is the mirror image of setData. It starts at the data section of a ChainTree. This allows you to ignore the “tree/data” part of a path (as is done in setData)