Parameters
optsopts.root{object} a merkle root to a radix tree. If none, RadixTree will create an new root.opts.db{object} a level db instance; alternatively,opts.graphcan be usedopts.graph{object} an instance of ipld-graph-builder; alternatively,opts.dagcan be usedopts.dag{object} an instance if ipfs.dag. If there is noopts.graphthis will be used to create a new graph instance.opts.decoder{object} a cbor decoder
the root of the tree
Type: Buffer
gets a value given a key
Parameters
keyany
Returns Promise
stores a value at a given key returning the tree node that the value was saved in
Parameters
keyanyvalue
Returns Promise
smContainer.js deletes a value at a given key
Parameters
keyany
Returns Promise
returns a promise that resolve when the tree is done with all of its writes
Returns Promise
creates a merkle root for the current tree and stores the data persistently
Returns Promise
Checks if a given root exists or not
Parameters
rootBuffer
returns the state of an empty tree
returns an Uint1Array constructor which is used to represent keys
Returns object
returns a merkle link for some given data
Parameters
dataBuffer the data which you would like to hash
Returns Buffer