@therootnetwork/api
A utility package that complements the@polkadot/api to connect and interact with the Root Network node.
Install
Usage
- Create an API instance
- Use
apiinstance to interact with node
API
function getApiOptions()
Returns an ApiOptions object that contains necessary types and RPC methods to connect The Root Network.
function getPublicProvider(network: NetworkName, useWsProvider?: boolean)
Returns a provider instance of either WsProvider or HttpProvider that connects to TRN mainnet "root" or testnet "porcini".