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

runes3

v1.0.5

Published

A Javascript library for interacting with Bitcoin Runes

Downloads

68

Readme

runes3.png

NOTE: You can find a full version of our docs here

🚀 Quickstart

Runes3 is a modern Typescript and NodeJS llibrary for Bitcoin Runes. Featuring XVERSE wallet support, rune balance and event indexing, ultra fast runestone decoders with WASM and much more!

Install Runes3

npm i runes3

Get a Runes RPC endpoint

You will also need an RPC endpoint to connect to a Nana indexer (see below for a free one) or a fully synced nana node.

What is Nana?

Nana is an extension to the original Runes indexer by Ord. It was developed by Runeapes Labs and comes with extra features such as:

  • More extensive endpoints to its RPC than ord
  • Much faster indexing (where as Ord can take up to a week, nana indexes the runes ledger in 12 hours). Infact if you are reading this at night and you setup a nana node right now, it will be ready by the time you wake up (assuming youre a heavy sleeper haha).
  • A 30GB total ledger size (rather than 220gb+ for ORD)
  • A codebase written fully in Javascript and an industry standard database (postgresql) which can be easily modified to do whatever you want.
  • Doesn't need a BTC full node to build the Runes ledger! (can use an RPC endpoint like from quicknode) saving you about 100 dollars per month in block cloud storage.

If you don't want to host a version of Nana yourself:

You can also use satsignal's free public endpoint:

https://runes.satsignal.io/v1

or if you require your own personal authed endpoint (with much more flexible rate limits), you can create an account for free with our friends over at https://satsignal.io

Connect to the RPC with Runes3

const { Runes3 } = require("runes3");

const Runes = new Runes3("https://runes.satsignal.io/v1");

/*
NOTE:
satsignal.io provides this free endpoint for everyone to support the Runes
ecoosystem. If you need higher ratelimits you can create an account there and
get an authed endpoint or run your own runes node with
https://github.com/runeapeslabs/Nana (1tb+ of storage and 16gb of ram required)
*/

3. Get an Accounts balance

const { Runes3 } = require("runes3");

const Runes = new Runes3("https://runes.satsignal.io/v1");

const start = async () => {
  const balances = await Runes.getAccount(
    "bc1pdcy7dw547w8qle3ltc3efulsv2ng66pwy3fwcxpphmn8ghc5sxfsgh72la"
  ).getBalances();

  console.log("This address has the following runes: ", balances.keys());

  console.log("The balance for 845769:3964 is: ");
  const balance = balances.get("845769:3964").getAmount();

  console.log(balance);
};

start();