2.1.0 • Published 2 years ago

w3-wrapper v2.1.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
2 years ago

Web3js wrapper

Introduction

A library that facilitatets interaction with Ethereum Node, implementation may vary from:

  • Native JSON-RPC implementation
  • Any third-party library that support JSON-RPC with Ethereum Node (web3js, Ethersjs)

How-to

Publish

To publish latest library, do:

npm run build
git push (to main)

User

In order to start using this wrapper library

// Assign JSON-RPC api url ASAP (app/script start-up)
EthereumNodeClientSingleton.setJsonRpcAPI('http://localhost:8545');

// At other module, import the class and get the required namespaces via singleton
const nodeClient = EthereumNodeClientSingleton.getInstance();
const latestBlock = await nodeClient.Eth.getBlockNumber();