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

1.4.0 • Public • Published

koinos-rpc

Typescript library to communicate with Koinos API via RPC

How to use

import { Client } from 'koinos-rpc';

void (async () => {
   const client = new Client(['https://api.koinosblocks.com']);
   const { head_topology } = await client.chain.getHeadInfo();
   console.log(JSON.stringify(head_topology, null, 2));
})();

Visit examples directory for more examples.

Tests

There are sets of unit and integration tests

Install dependencies:

yarn install

Run unit tests:

yarn run test:unit

Run integration tests:

yarn run test:integration

Licence

MIT

Package Sidebar

Install

npm i koinos-rpc

Weekly Downloads

2

Version

1.4.0

License

MIT

Unpacked Size

55.8 kB

Total Files

27

Last publish

Collaborators

  • bgornicki