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 🙏

© 2026 – Pkg Stats / Ryan Hefner

banani-bns

v0.0.10

Published

JS/TS library for the Banano cryptocurrency's currently unofficial Banano Name System (BNS)

Readme

See the protocol specification, docs or web wallet / demo

Installing

NPM

npm i banani-bns

Web

Add thebns-browser.js file in this browser to your site. Then, in your <head>, add:

<script src="/path/to/bns-browser.js"></script>

You can now access the library through window.bns in your scripts.

Example

Resolving

import { banani, Resolver } from "banani-bns";

const rpc = new banani.RPC("https://kaliumapi.appditto.com/api");
const tld_mapping = {
  "mictest": "ban_1dzpfrgi8t4byzmdeidh57p14h5jwbursf1t3ztbmeqnqqdcbpgp9x8j3cw6",
  "jtv": "ban_3gipeswotbnyemcc1dejyhy5a1zfgj35kw356dommbx4rdochiteajcsay56",
  "ban": "ban_1fdo6b4bqm6pp1w55duuqw5ebz455975o4qcp8of85fjcdw9qhuzxsd3tjb9",
};

const resolver = new Resolver(rpc, tld_mapping);

console.log(await resolver.resolve("nishina247", "mictest"));

Resolve Backwards

Only do this if you have a good reason to. Here's a hastily written code sample:

import * as bns from "banani-bns";

const rpc = new bns.banani.RPC("https://kaliumapi.appditto.com/api");

const TLDS: Record<string, `ban_${string}` | `nano_${string}`> = {
  "mictest": "ban_1dzpfrgi8t4byzmdeidh57p14h5jwbursf1t3ztbmeqnqqdcbpgp9x8j3cw6",
  "jtv": "ban_3gipeswotbnyemcc1dejyhy5a1zfgj35kw356dommbx4rdochiteajcsay56",
  "ban": "ban_1fdo6b4bqm6pp1w55duuqw5ebz455975o4qcp8of85fjcdw9qhuzxsd3tjb9",
};

const resolver = new bns.Resolver(rpc, TLDS);

//Only looks through last 500 received transactions and 50 receivable transactions, for simplicity
//You can easily modify this to go further, though a lot more RPC calls could be made (eg, some accounts may have hundreds of thousands of blocks), so be careful.
async function find_bns_domains_for_account(account: bns.banani.Address, tld: string) {
  //search up to 50 receivable blocks, find the what are likely to be Domain Resolver blocks
  let receivable_resp = (await rpc.get_account_receivable(account, 50, "4224", true)).blocks;
  let possible_domain_accounts = Object.keys(receivable_resp).filter((hash) => receivable_resp[hash].amount === "4224").map((hash) => receivable_resp[hash].source);
  //now look through the last 500 received transactions
  possible_domain_accounts.push(...(await rpc.get_account_history(account, 500)).history.filter((info) => info.type === "receive" && info.amount === "4224").map((info) => info.account));
  //console.log(possible_domain_accounts);
  let domains = [];
  //now fetch those domains!
  for (const possible of possible_domain_accounts) {
    //console.log(possible);
    try {
      let domain = await resolver.resolve_backwards_ish(possible as bns.banani.Address, tld);
      if (domain) domains.push(domain);
    } catch (_) {}
  }
  return domains;
}

console.log(await find_bns_domains_for_account("ban_1o7ija3mdbmpzt8qfnck583tn99fiupgbyzxtbk5h4g6j57a7rawge6yzxqp", "ban"));