@eximchain/weyl-web3-client

0.2.2 • Public • Published

weyl-client

Tiny npm package which gives a configured interface to our WeylGov contract. For convenience, it also has a isBlockMaker method to check against the core BlockVoting contract. Ships with Typescript bindings built-in.

Usage is dead simple, require the constructor function and call it with your HttpProvider URL:

// Import as module, or use require().default
import ClientBuilder from '@eximchain/weyl-web3-client';

const ClientBuilder = require('@eximchain/weyl-web3-client').default

// Build a client using your Web3 Provider URL
const WeylClient = ClientBuilder(process.env['WEB3_URL']);

// Then use the contract
const numNominees = await WeylClient.contract.methods.nomineesInCycle().call();

// Or check a blockmaker
const isBlockMaker = await WeylClient.isBlockMaker(address);

Readme

Keywords

Package Sidebar

Install

npm i @eximchain/weyl-web3-client

Weekly Downloads

10

Version

0.2.2

License

MIT

Unpacked Size

47.6 kB

Total Files

10

Last publish

Collaborators

  • andreweximchain
  • exim-service-bot
  • louis-eximchain
  • john-osullivan
  • godokoro