Files: e2cd325fdcc6c86a830407f0c4c8638f3a5ad25a / docs / index.md
3777 bytesRaw
<!-- 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.
get
gets a value given a key
Parameters
key
any
Returns Promise
set
stores a value at a given key
Parameters
key
anyvalue
Returns Promise
delete
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
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