@anzerr/banano.rpc

Typescript interface to call the nano rpc

Usage no npm install needed!

<script type="module">
  import anzerrBananoRpc from 'https://cdn.skypack.dev/@anzerr/banano.rpc';
</script>

README

Intro

GitHub Actions status | linter GitHub Actions status | publish GitHub Actions status | test

Typescript interface to call the nano rpc

Install

npm install --save git+https://git@github.com/anzerr/banano.rpc.git
npm install --save @anzerr/banano.rpc

Example

import {Rpc} from 'banano.rpc';

let api = new Rpc(`http://localhost:7072`); // {number: 'bigInt|raw'} or {number: (n: string) => any}
api.account('ban_1fundm3d7zritekc8bdt4oto5ut8begz6jnnt7n3tdxzjq3t46aiuse1h7gj').balance().then((res) => {
    console.log(res); // {balance: number, pending: number}
})