Introduction
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!
npm i runes3
π Prerquisitesβ
-
π€ A Nana Runes Indexer (TLDR: If you dont have one you can just use https://runes.satsignal.io/v1)
Nana is a Runes indexer built ontop of Ord 0.19.1 that exposes an RPC with extra functionality for Runes and a reduced storage footprint (The entire Runes transfer ledger only uses 30GB on Nana, while on Ord its over 240gb!). To get and endpoint you can either:
- Use Satsignalβs public free endpoint at: https://runes.satsignal.io/v1
- Or run your own Nana node (you will need a fully synced BTC node with txindex=1): https://docs.nanas.sh/run-node
π Basic exampleβ
They say an example speaks a thousand words (β¦ nobody says that lol):
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").parse();
console.log(balance);
};
start();
β€οΈ Support Runes3:β
If you find using Runes3 and the Nana ecosystem often in your project and woould like to support us, you can donate to the crypto address below (and thankyou!):
ETH: 0xD0C253997cCaE6F5F831d34E16EA6b236Dc57988
BTC (segwit): bc1pphwjuufrx6aalsvmv5uujnprsw0wpz4rtjra4f0quys2cylugxws5gz7wc