tupelo-wasm-sdk

Home > tupelo-wasm-sdk

tupelo-wasm-sdk package

The Tupelo WASM SDK is designed to be used in both nodejs and the browser.

Classes

Class Description
ChainTree 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.
Community Commmunity is a combination of a Tupelo NotaryGroup and the application ‘Community’ running. The remote p2p community app will also store blocks, and this is the default supported way that the current wasm-sdk works.
CommunityMessenger (BETA) CommunityMessenger handles the overlay pubsub community provides to make sure that nodes correctly relay messages within this community. Community listends to a number of libp2p topics (we call shards here) and internal community topics are broadcast on those libp2p topics so that libp2p will correctly relay those messages.
Dag Underlies a ChainTree, it represents a DAG of IPLD nodes and supports resolving accross multiple nodes.
EcdsaKey EcdsaKey defines the public/private key-pairs used to interact with Tupelo. It also supportes generating new keys either randomly or through a passphrase.
Repo Repo is a typescript wrapper around the IPFS Repo https://github.com/ipfs/js-ipfs-repo
WrappedBitswap A wrapper around an IPFS call-back-based bitswap that turns it into async/await compatible. There is currently an open PR on the bitswap repo that will allow us to switch to the IPFS-maintained bitswap completely.
WrappedBlockService A wrapper around a callback-based IBlockService that allows async/await There is an open PR on the bitswap PR which will allow us to switch to the ipfs-maintained version.

Functions

Function Description
tomlToNotaryGroup(tomlString) takes a toml config and returns a NotaryGroup object.

Interfaces

Interface Description
IBitSwap An IPFS Bitswap instance.
IBlock An IPFS Block
IBlockService The interface to a js-ipfs block-service. See: https://ipfs.github.io/js-ipfs-block-service
ICallbackBitswap The callback-based version of Bitswap (current master).
IChainTreeInitializer The options to create a new ChainTree.
IDagStore An IPFS DagStore instance
INodeOptions Defines the options to create a p2p node
IP2PNode A instance of a js-libp2p node
IPubSub The interface describing libp2p pubsub
IPubSubMessage Defines the interface used by libp2p for delivering pubsub messages
IQuery The interface to an IPFS Query https://github.com/ipfs/interface-datastore
IResolveResponse This defines the resolve response when doing queries against the DAG from IPFS
RepoOpts Options used to create a new IPFS repo. https://github.com/ipfs/js-ipfs-repo

Namespaces

Namespace Description
Community  
p2p  
Tupelo Tupelo is the more “raw” namespace, it is generally expected that you would use higher level wrapper classes around this namespace. For example: EcdsaKey or

Variables

Variable Description
CID // * This is a helper const so that CID types can be used in other repos. // * //
defaultNotaryGroup The default (testnet) notary group for the Tupelo Network
establishTokenTransaction Returns a new establishTokenTransaction which is used to setup the monetary policy of a new token on a ChainTree
mintTokenTransaction  
receiveTokenTransaction  
receiveTokenTransactionFromPayload This function is useful if you have the full payload from the send token sent to you no need to deconstruct and the reconstruct the payload. Often wallets will send this payload as base64.
sendTokenTransaction  
setDataTransaction Returns a setDataTransaction
setOwnershipTransaction returns a setOwnershipTransaction