0.2.2 • Published 5 years ago

@eximchain/weyl-web3-client v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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);
0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago