npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

crypto-balance

v0.0.20

Published

Query various crypto tokens for their address balances

Downloads

104

Readme

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