https://github.com/anzerr/banano.rpc
Typescript interface to call the nano rpc
https://github.com/anzerr/banano.rpc
banano client nano rpc typescript util
Last synced: 6 months ago
JSON representation
Typescript interface to call the nano rpc
- Host: GitHub
- URL: https://github.com/anzerr/banano.rpc
- Owner: anzerr
- License: mit
- Created: 2019-08-18T21:24:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T16:26:51.000Z (about 4 years ago)
- Last Synced: 2025-02-03T10:47:20.054Z (about 1 year ago)
- Topics: banano, client, nano, rpc, typescript, util
- Language: TypeScript
- Homepage:
- Size: 118 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### `Intro`



Typescript interface to call the [nano rpc](https://docs.nano.org/commands/rpc-protocol/#block_info)
#### `Install`
``` bash
npm install --save git+https://git@github.com/anzerr/banano.rpc.git
npm install --save @anzerr/banano.rpc
```
### `Example`
``` javascript
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}
})
```