Files: 231dafc7896dbb6490a92ca3cf0a6c29eacfda6f / docs / index.md
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
constructor
Parameters
opts
opts.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.graph
can be usedopts.graph
{object} an instance of ipld-graph-builder; alternatively,opts.dag
can be usedopts.dag
{object} an instance if ipfs.dag. If there is noopts.graph
this will be used to create a new graph instance.opts.decoder
{object} a cbor decoder
root
the root of the tree
Type: Buffer
get
gets a value given a key
Parameters
key
any
Returns Promise
set
stores a value at a given key returning the tree node that the value was saved in
Parameters
key
anyvalue
Returns Promise
delete
smContainer.js deletes a value at a given key
Parameters
key
any
Returns Promise
done
returns a promise that resolve when the tree is done with all of its writes
Returns Promise
flush
creates a merkle root for the current tree and stores the data persistently
Returns Promise
rootExists
Checks if a given root exists or not
Parameters
root
Buffer
emptyTreeState
returns the state of an empty tree
ArrayConstructor
returns an Uint1Array constructor which is used to represent keys
Returns object
getMerkleLink
returns a merkle link for some given data
Parameters
data
Buffer the data which you would like to hash
Returns Buffer
Built with git-ssb-web