crypto-balance
Query various crypto tokens for their address balances
Last updated 5 years ago by larskluge .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install crypto-balance 
SYNC missed versions from official npm registry.

crypto-balance

Query various crypto tokens for their address balances.

Warning: this is a very early version--use at your own risk. Pull requests are very much welcome as well as support for other tokens, blockchains, and services.

Supported Tokens

  • Bitcoin
  • Litecoin
  • Dogecoin
  • All tokens created on Counterparty
  • All tokens created on Dogeparty
  • Mastercoin
  • Ethereum (pre-sale)
  • Open Assets

.. and maybe more by now, in case we forget to update this section again, check the code src/services.

Installation

~ » npm install crypto-balance

How to Use

Command Line

~ » npm install -g crypto-balance # for global installation of _balance_
~ » balance DDogepartyxxxxxxxxxxxxxxxxxxw1dfzr                                                                      ~
1,009,968,741.03499746 DOGE
~ » balance 1LARSvRshS9Nm3D3aWLELQjNYtaBrWGzg2                                                                      ~
0.00010860 BTC
42.00000000 XCP/LARS

Node.js

var balance = require('crypto-balance');
balance("DCt8sxHX634ghqdDhWFtCPQUyZ3TEfLBCo", function(error, assets) {
  console.log(assets);
});

// [ { address: 'DCt8sxHX634ghqdDhWFtCPQUyZ3TEfLBCo',
//    quantity: 100000000,
//    asset: 'XDP/DOGEPARTY' },
//  { address: 'DCt8sxHX634ghqdDhWFtCPQUyZ3TEfLBCo',
//    quantity: 500000000000,
//    asset: 'XDP/DOLLARS' },
//  ...
// ]

Promise

var balance = require("crypto-balance");
balance("DDogepartyxxxxxxxxxxxxxxxxxxw1dfzr").then(function(balances) {
  console.log(balances);
});

// [ { address: 'DDogepartyxxxxxxxxxxxxxxxxxxw1dfzr',
//  quantity: '1399253366.95050883',
//  asset: 'DOGE' } ]

Tests

npm test

License

MIT

Current Tags

  • 0.0.20                                ...           latest (5 years ago)

20 Versions

  • 0.0.20                                ...           5 years ago
  • 0.0.19                                ...           5 years ago
  • 0.0.18                                ...           5 years ago
  • 0.0.17                                ...           5 years ago
  • 0.0.16                                ...           5 years ago
  • 0.0.15                                ...           5 years ago
  • 0.0.14                                ...           6 years ago
  • 0.0.13                                ...           6 years ago
  • 0.0.12                                ...           6 years ago
  • 0.0.11                                ...           6 years ago
  • 0.0.10                                ...           6 years ago
  • 0.0.9                                ...           6 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |