2.0.0 • Published 5 years ago

codechain-rpc v2.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

CodeChain RPC JS

CodeChain RPC JS is a JavaScript library that calls RPC to a CodeChain node.

How to install

If you are using NPM, use the command below:

npm install codechain-rpc --save

If you prefer Yarn, use the command below:

yarn add codechain-rpc

Example

const RPC = require("codechain-rpc").default;

async function main() {
  const rpc = new RPC("http://localhost:8080");

  const blockNumber = await rpc.chain.getBestBlockNumber();
  console.log(`Current best block number: ${blockNumber}`);
}

main().catch(console.error);

RPC list

You can find the RPC list in this link.

2.0.0

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago