0.0.4 • Published 6 years ago
bananojs v0.0.4
Bananojs
The node.js client for the banano blockchain
Install
To install the library:
npm install bananojs
# or yarn add bananojsUsage
const bananojs = require('bananojs')('banano node url here')Methods
Get block
const block = await bananojs.getBlock(hash)Get blocks
const blocks = await bananojs.getBlocks([hash, hash2])Get account balance
const balance = await bananojs.getAccountBalance(account)Get available suppy
const availableSupply = await bananojs.getAvailableSupply()Create Account
const account = await bananojs.createAccount(wallet)Create Seed
const seed = bananojs.createSeed()Create Wallet
const { wallet, seed } = await bananojs.createWallet()Get uptime
const uptimeInSeconds = await bananojs.getUptime()