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

abel-ghost-sdk

v0.0.8

Published

Tiny [Ghostkit](https://github.com/d13co/ghostkit) SDK for [Abel](https://github.com/Algorand-Developer-Retreat/abel). It batches read-only on-chain lookups (balances, asset metadata, block times, auth/rekey addresses) into single `simulate` calls — **no

Readme

Abel Ghost SDK

Tiny Ghostkit SDK for Abel. It batches read-only on-chain lookups (balances, asset metadata, block times, auth/rekey addresses) into single simulate calls — no deployment, no fees, on any network.

For background on how the ghost (simulate-based, deployment-free) calls work, and the canonical build process (algokit project run build from the repo root), see the root README.

Install

npm install abel-ghost-sdk
# peer deps
npm install @algorandfoundation/algokit-utils algosdk

Quick start

import { AlgorandClient } from "@algorandfoundation/algokit-utils"
import { AbelGhostSDK } from "abel-ghost-sdk"

const algorand = AlgorandClient.mainNet()
const sdk = new AbelGhostSDK({ algorand })

// Batch look up asset metadata (one simulate round-trip)
const assets = await sdk.getAssetsTinyLabels([31566704n])
console.log(assets.get(31566704n))
// { id: 31566704n, name: 'USDC', unitName: 'USDC', decimals: 6, labels: [...] }

Constructor

new AbelGhostSDK({
  algorand,            // AlgorandClient (required) — picks the network (LocalNet/TestNet/MainNet)
  registryAppId,       // number | bigint — Abel label registry app id (MainNet: 2914159523). Needed for label methods.
  concurrency = 4,     // how many chunked simulate calls run in parallel
  ghostAppId,          // bigint — optional deployed ghost app id. Omit to use the deployment-free ghost path.
  readerAccount,       // string — sender used for simulation. Defaults to a fee-sink address; override per network if needed.
})

Requests larger than the per-call limit (63 accounts / assets) are chunked automatically and run with the configured concurrency.

Methods

getBalanceInfo(accounts: string[]): Promise<Map<string, BalanceInfo>>

Algo balance and minimum balance for many accounts. BalanceInfo is { balance: bigint, minBalance: bigint }; missing/empty accounts come back as { balance: 0n, minBalance: 0n }.

const balances = await sdk.getBalanceInfo([
  "A7NMWS3NT3IUDMLVO26ULGXGIIOUQ3ND2TXSER6EBGRZNOBOUIQXHIBGDE",
])
for (const [addr, { balance, minBalance }] of balances) {
  console.log(addr, balance, minBalance)
}

getAuthAddrs(accounts: string[]): Promise<Map<string, string | undefined>>

Auth (rekey) address for many accounts. Returns the rekeyed-to address, or undefined when an account is not rekeyed.

const authAddrs = await sdk.getAuthAddrs([
  "AAEXOSW7JKN4IYPMUSKKIIJXIK2RRXMBWVZTN2RH5DDH4HZSQETPYBHCJQ",
])
authAddrs.get("AAEXOSW7JKN4IYPMUSKKIIJXIK2RRXMBWVZTN2RH5DDH4HZSQETPYBHCJQ")
// "XSKED5VKZZCSYNDWXZJI65JM2HP7HZFJWCOBIMOONKHTK5UVKENBNVDEYM"

getAssetsTinyLabels(assetIds: (number | bigint)[]): Promise<Map<bigint, AssetTinyLabels>>

Lightweight metadata for many assets in one go. AssetTinyLabels is { id: bigint, name: string, unitName: string, decimals: number, labels: string[] }. The labels array is populated from the Abel registry when registryAppId is set. The "pv" label means Pera Verified.

const sdk = new AbelGhostSDK({ algorand, registryAppId: 2914159523 })
const assets = await sdk.getAssetsTinyLabels([31566704, 312769])
console.log(assets.get(31566704n))

getAssetLabels(assetId: number | bigint): Promise<string[]>

Abel registry labels for a single asset. Returns [] if no registryAppId is configured.

const labels = await sdk.getAssetLabels(31566704)

getAllAssetIDs(): Promise<bigint[]>

Every asset id known to the configured Abel registry (reads the registry's box names). Returns [] without a registryAppId.

const ids = await sdk.getAllAssetIDs()

getBlockTimesAndTc(firstRound, lastRound): Promise<BlockRoundTimeAndTc[]>

Timestamp and transaction counter for a range of blocks. Each entry is { rnd: bigint, ts: number, tc: bigint }.

const { lastRound } = await algorand.client.algod.status().do()
const blocks = await sdk.getBlockTimesAndTc(lastRound - 1000n, lastRound)
console.log(blocks[0]) // { rnd, ts, tc }

Running the examples

The examples/ directory has runnable MainNet scripts. Build first from the repo root (algokit project run build), then from projects/sdk:

npx tsx examples/get-simple.ts          # asset metadata
npx tsx examples/get-label.ts           # asset labels + tiny labels
npx tsx examples/get-all-assets.ts      # all registry asset ids
npx tsx examples/get-blk-time-tc.ts     # block times & tx counters
npx tsx examples/get-auth-addrs.ts      # auth/rekey addresses

# get-auth-addrs with no args pulls accounts rekeyed to a known address from the
# indexer and verifies them; or pass addresses explicitly:
npx tsx examples/get-auth-addrs.ts <ADDR1> <ADDR2> ...