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

@recursa-ai/idl

v0.1.0

Published

Recursa Anchor IDL + canonical program IDs, instruction discriminators, PDA derivation helpers, and token mint registry for @recursa-ai/sdk and downstream agent consumers.

Readme

@recursa-ai/idl

Recursa Anchor IDL + canonical program IDs, instruction discriminators, PDA derivation helpers, and token mint registry. Dependency-free so it composes cleanly with both browser + Node + edge runtimes without forcing consumers to install @solana/web3.js or @coral-xyz/anchor.

Used by @recursa-ai/sdk to build unsigned transactions without pulling in all of Anchor. Shipped as its own package so agent authors who only need discriminators + PDA shapes can take this without the SDK's Jupiter-price + strategy-filter machinery.

Install

npm install @recursa-ai/idl

What's exported

// The Anchor IDL JSON as a typed const.
import { RECURSA_IDL } from "@recursa-ai/idl/idl";
import { Program } from "@coral-xyz/anchor";
const program = new Program(RECURSA_IDL, provider);

// Program IDs + well-known system/lending pubkeys.
import {
  RECURSA_PROGRAM_ID_DEVNET,
  getRecursaProgramId,
  TOKEN_PROGRAM_ID,
  KAMINO_LEND_PROGRAM_ID,
} from "@recursa-ai/idl";

// PDA seed materializers (strings/bytes → no web3.js dep).
import {
  configPdaSeeds,
  userStatsPdaSeeds,
  positionPdaSeeds,
  u64ToLeBytes,
} from "@recursa-ai/idl";
import { PublicKey } from "@solana/web3.js";

const [configPda] = PublicKey.findProgramAddressSync(
  configPdaSeeds(),
  new PublicKey(RECURSA_PROGRAM_ID_DEVNET)
);

// Instruction discriminators + borsh-encoded arg bodies.
import {
  DISCRIMINATORS,
  encodeCreatePositionData,
} from "@recursa-ai/idl";

const data = encodeCreatePositionData({
  amount: 1_000_000_000n,
  leverage: 2_500_000n, // 2.5×
  supplyProtocol: "kamino",
  borrowProtocol: "kamino",
  crossAsset: false,
  userNonce: BigInt(Date.now()),
  swapRouteData: null,
  minOutputAmount: null,
});

// Token mint registry.
import { MINT_BY_SYMBOL, mintFor } from "@recursa-ai/idl";
const { mint, decimals } = mintFor("SOL");

Regenerating the IDL

The source of truth is programs/recursa/src/**/*.rs. When the Rust program changes:

anchor build
cp target/idl/recursa.json packages/idl/src/recursa.json
cd packages/idl && npm test  # parity tests catch drifted discriminators / enums
npm run build

The parity tests (src/instructions.test.ts) compare DISCRIMINATORS against the IDL JSON — if the JSON gets out of sync they fail loudly. If an instruction's snake_case name changes, add the new entry + delete the old one.

Contract stability

v0.1 is pre-1.0 — minor versions may reshape TS surfaces. The IDL JSON itself is stable: new instructions get added; existing ones don't change discriminators, account order, or arg layout without a program-level migration.

License

MIT. © 2026 Recursa.