foundry-rpc
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Foundry RPC JS Build Status

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

How to install

If you are using NPM, use the command below:

npm install foundry-rpc --save

If you prefer Yarn, use the command below:

yarn add foundry-rpc

Example

const RPC = require("foundry-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.

Readme

Keywords

Package Sidebar

Install

npm i foundry-rpc

Weekly Downloads

0

Version

0.1.2

License

ISC

Unpacked Size

188 kB

Total Files

56

Last publish

Collaborators

  • cubismic
  • hoongee
  • jh_kodebox
  • jjg_kodebox
  • jmyang_kodebox
  • rbtree_kodebox
  • suengmin-codechain