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

@ar.io/solana-contracts

v1.0.1

Published

TypeScript client for the AR.IO Solana programs (ario-core, ario-gar, ario-arns, ario-ant, ario-ant-escrow). Codama-generated per-program clients plus hand-written helpers for things the IDL doesn't expose (e.g. the ANT-escrow canonical-message builders s

Downloads

3,462

Readme

@ar.io/solana-contracts

Codama-generated TypeScript client for the AR.IO Solana programs.

| Program | Subpath | |---|---| | ario-core (ARIO SPL token, vaults, primary names) | @ar.io/solana-contracts/core | | ario-gar (Gateway Address Registry, staking, epochs, rewards) | @ar.io/solana-contracts/gar | | ario-arns (ArNS name registry, demand factor, pricing) | @ar.io/solana-contracts/arns | | ario-ant (Arweave Name Token — Metaplex Core NFT) | @ar.io/solana-contracts/ant | | ario-ant-escrow (trustless multi-protocol ANT custody) | @ar.io/solana-contracts/ant-escrow |

Built on @solana/kit (peer dependency). Generated with Codama.

Install

yarn add @ar.io/solana-contracts @solana/kit
# or
npm install @ar.io/solana-contracts @solana/kit

Use

import { getBalanceEncoder } from '@ar.io/solana-contracts/core';
import { PurchaseType }      from '@ar.io/solana-contracts/arns';
import { GatewayStatus }     from '@ar.io/solana-contracts/gar';

const bytes = getBalanceEncoder().encode({
  owner: '...',
  amount: 1_000_000n,
  bump: 254,
});

Each subpath exposes Codama's standard surface:

  • accounts/ — typed encoders/decoders for every PDA (getBalanceEncoder, getBalanceDecoder, getBalanceCodec, etc.)
  • types/ — instruction-argument structs + enums (PurchaseType, GatewayStatus, Protocol)
  • instructions/ — async / sync instruction builders (getJoinNetworkInstructionAsync, etc.)
  • pdas/ — PDA derivation helpers (findBalancePda, etc.)
  • errors/ — typed Anchor error constants per program
  • programs/ — Codama's program factory + identify*Instruction helpers

What is this?

The AR.IO Network's on-chain programs run on Solana. They live in this repo under programs/; this package is the auto-generated TypeScript client that downstream consumers (the public AR.IO SDK, third-party integrators) import from.

Generated artifacts (src/<program>/ + lib/) are not committed — every release runs anchor build && yarn codegen && yarn build from a clean checkout and publishes the resulting tarball.

Versioning

Independent semver. Wire-format changes in the underlying Anchor programs (IDL-affecting source edits) bump the major. Additive surface changes bump the minor. Patch versions cover non-breaking codegen fixes.

The package version is not locked to the deployed program version — program identity is given by the chain-deployed program IDs, not by the client package version.

Cluster coupling (resolved — ADR-024)

Historically two zero-copy registry accounts used #[cfg(feature = "devnet-shrunk")] to swap fixed-array sizes between mainnet and a shrunk devnet, so the Codama encoders (which embed those sizes at codegen time) only matched one cluster at a time.

That feature was retired (ADR-024). Every cluster — localnet, staging (on Solana devnet), and mainnet — now compiles the same production-sized registries:

| Account | All clusters | |---|---| | GatewayRegistry.gateways | 3,000 slots | | NameRegistry.names | 50,000 slots (expandable to 200,000) | | Epoch.failure_counts | 3,000 slots |

So a single published package matches every deploy — there is no encoder/account-size mismatch to reason about, and the staging vs @latest dist-tags differ only by release channel, not by encoded sizes.

Local dev

git clone https://github.com/ar-io/ar-io-solana-contracts.git
cd ar-io-solana-contracts
anchor build              # produces target/idl/*.json
cd clients/ts
yarn install              # postinstall regenerates src/<program>/
yarn build:tsc            # compiles to lib/

CLUSTER (staging | mainnet, default staging) now only selects the npm release channel; registry sizes are identical across clusters (see "Cluster coupling" above).

Publishing

CI workflow .github/workflows/release-clients-ts.yml is [workflow_dispatch]-triggered with cluster (staging | mainnet), optional version override, and optional dry_run.

Auth uses npm OIDC Trusted Publishing — same model as @ar.io/sdk. No NPM_TOKEN secret in CI. The workflow declares id-token: write; npm CLI ≥9.5 negotiates the OIDC handshake with npmjs.com and attests both publisher identity AND build provenance.

First publish (chicken-and-egg)

Trusted publishers are configured per package on npm, so the package must exist before the trusted-publisher rule can be added. One-time bootstrap:

  1. Publish 0.1.0-staging.0 manually from a local checkout with npm publish --access public --tag staging (using your personal npm credentials).
  2. On npmjs.com: navigate to @ar.io/solana-contractsSettingsTrusted PublishersAdd Trusted Publisher:
    • Publisher: GitHub Actions
    • Organization: ar-io
    • Repository: ar-io-solana-contracts
    • Workflow filename: release-clients-ts.yml
    • Environment: (leave blank)
  3. Subsequent releases (staging rebuilds, mainnet promotion, version bumps) all run through CI — no token, no manual step.

Dist-tags

| Tag | Cluster | Use for | |---|---|---| | @latest | mainnet | yarn add @ar.io/solana-contracts | | @staging | staging (Solana devnet) | yarn add @ar.io/solana-contracts@staging |

License

AGPL-3.0-or-later.