@rosen-chains/ergo-node-network
v9.0.6
Published
ergo node network package for rosen ergo chain
Downloads
514
Readme
@rosen-chains/ergo-node-network
Table of contents
Introduction
@rosen-chains/ergo-node-network
is a package to be used as network api
provider for @rosen-chains/ergo
package.
Installation
npm:
npm i @rosen-chains/ergo-node-network
yarn:
yarn add @rosen-chains/ergo-node-network
Usage
import { ErgoChain } from '@rosen-chains/ergo';
import ErgoNodeNetwork from '@rosen-chains/ergo-node-network';
const ergoNodeNetwork = new ErgoNodeNetwork({
nodeBaseUrl: 'SOME_NODE_URL',
extractorOptions: {
lockAddress: 'SOME_LOCK_ADDRESS',
tokens: {
// SOME_TOKENS_OBJECT
},
},
});
const ergoChainConfig = {
// SOME_ERGO_CHAIN_CONFIG
};
const ergoChain = new ErgoChain(ergoNodeNetwork, ergoChainConfig);
Please note that the node should support blockchain
apis, which can be checked
through isExplorer
flag from info
api.