Typescript library to communicate with Koinos API via RPC
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.
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
MIT