@clover-network/node-tpye
v1.0.2
Published
clover-node-types Usage This repo contains Typescript bindings for custom clover-node modules.
Downloads
7
Readme
clover-node-types
Usage
This repo contains Javascript bindings for clover-node-type modules.
In order to use the standard API against clover you must initialize the API's types object as follows:
npm install @clover-network/node-tpye
example:
const cloverTypes = require('@clover-network/node-tpye')
const { ApiPromise, WsProvider } = require('@polkadot/api');
async function nonce(){
const wsProvider = new WsProvider ('wss://api.jisand.com');
const api = await ApiPromise.create({
provider: wsProvider,
types: cloverTypes
});
var nonce = await api.rpc.system.accountNextIndex('5Gf3M6b4hy6D7QdGwaKGv1AteiuLzpPw4XVo9FmuHZbDG6qn');
console.log(nonce)
}
nonce()