Socket
Book a DemoInstallSign in
Socket

@clover-network/node-types

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clover-network/node-types

clover-node-types Usage This repo contains Typescript bindings for custom clover-node modules.

1.0.5
latest
Source
npmnpm
Version published
Weekly downloads
2
-88.24%
Maintainers
4
Weekly downloads
 
Created
Source

npm version MIT

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-types

example:

const cloverTypes = require('@clover-network/node-types');
const { ApiPromise, WsProvider } = require('@polkadot/api');

async function connectToClover(){
    const wsProvider = new WsProvider ('wss://api.clover.finance');
    const api = await ApiPromise.create({ 
        provider: wsProvider,
        types: cloverTypes
     });
     var nonce = await api.rpc.system.accountNextIndex('5Gf3M6b4hy6D7QdGwaKGv1AteiuLzpPw4XVo9FmuHZbDG6qn');
     console.log(nonce);
}
connectToClover();

FAQs

Package last updated on 11 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.