@bananocoin/banano-ts-cli

1.0.17 • Public • Published

banano-ts-cli

a command line interface for the banano cryptocurrency that uses the bananojs TypeScript bindings.

simple TypeScript functions

import * as index from './index';
import * as crypto from 'crypto';
import * as httpsRateLimit from 'https-rate-limit';

const bananodeUrl = 'https://kaliumapi.appditto.com/api';

const run = async () => {
  httpsRateLimit.setUrl(bananodeUrl);
  const seed: string = crypto.randomBytes(32).toString('hex');
  console.log('seed', seed);
  const privateKey: string = index.getPrivateKeyFromSeed(seed, 0);
  console.log('privateKey', privateKey);
  const publicKey: string = await index.getPublicKeyFromPrivateKey(privateKey);
  console.log('publicKey', publicKey);
  const account: string = index.getAccountFromPublicKey(publicKey);
  console.log('account', account);
  const accountInfoReq = {
    action: 'account_info',
    account: account,
    count: 1,
  };
  console.log(accountInfoReq);
  const accountInfoResp = await httpsRateLimit.sendRequest(accountInfoReq);
  console.log(accountInfoResp);
};
run();

examples of most functions as part of the cli

https://github.com/BananoCoin/banano-ts-cli/blob/master/src/main.ts

complete documentation of banano CLI functions

https://github.com/BananoCoin/banano-ts-cli/blob/master/docs/banano-cli.md

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.172latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.172
1.0.161
1.0.151
1.0.141
1.0.131
1.0.111
1.0.101
1.0.91
1.0.81
1.0.71
1.0.61
1.0.51
1.0.41
1.0.31
1.0.21

Package Sidebar

Install

npm i @bananocoin/banano-ts-cli

Weekly Downloads

16

Version

1.0.17

License

MIT

Unpacked Size

54 kB

Total Files

21

Last publish

Collaborators

  • dev-ptera
  • coranos