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

@aura-protocol/sdk-ts

v0.3.0

Published

TypeScript SDK for the AURA autonomous treasury program on Solana

Readme

AURA banner

@aura-protocol/sdk-ts

TypeScript SDK for the AURA autonomous treasury program on Solana.

The SDK is generated from the current Anchor IDL and organized as a production-shaped protocol SDK:

  • small AuraClient for RPC, Anchor program access, decoding, and transaction sending
  • domain instruction modules under instructions.<domain>
  • typed account fetchers under accounts.<domain>
  • PDA derivation helpers
  • generated error and event utilities
  • runtime instruction metadata for required/optional accounts

Program status: AURA currently targets devnet/pre-audit deployments. The SDK is typed and complete for the current IDL, but do not use devnet examples to secure production funds before a stable audited release.

Install

npm install @aura-protocol/sdk-ts @solana/web3.js bn.js

Create A Treasury

import BN from "bn.js";
import { Connection, Keypair } from "@solana/web3.js";
import {
  AuraClient,
  accounts,
  instructions,
  type CreateTreasuryArgs,
} from "@aura-protocol/sdk-ts";

const connection = new Connection("https://api.devnet.solana.com", "confirmed");
const client = new AuraClient({ connection });
const owner = Keypair.generate();

const args: CreateTreasuryArgs = {
  agentId: "agent-1",
  aiAuthority: owner.publicKey,
  createdAt: new BN(Math.floor(Date.now() / 1000)),
  pendingTransactionTtlSecs: new BN(900),
  policyConfig,
  protocolFees,
};

const { treasury, input } = accounts.createTreasuryInput({
  owner: owner.publicKey,
  args,
});

const instruction = await instructions.treasury.createTreasury(client, input);
const signature = await client.sendInstructions(owner, [instruction]);

Instruction Pattern

Every instruction builder accepts one named input object:

const ix = await instructions.execution.abandonProposal(client, {
  accounts: {
    operator,
    treasury,
    dwalletState: null,
  },
  args: {
    proposalId,
    now,
  },
});

Single args-struct instructions expose the product args directly:

await instructions.treasury.createTreasury(client, {
  accounts: { owner, treasury, systemProgram },
  args: createTreasuryArgs,
});

Send helpers are available for every builder:

await instructions.treasury.sendCreateTreasury(client, ownerSigner, input);

Discover Required Accounts

import { instructions } from "@aura-protocol/sdk-ts";

const required = instructions.listRequiredInstructionAccounts("createTreasury");
const optional = instructions.listOptionalInstructionAccounts("abandonProposal");
const definition = instructions.requireInstructionDefinition("proposeTransaction");

Each account definition includes propertyName, signer, writable, and optional.

Imports

import { AuraClient, accounts, instructions, deriveTreasuryAddress } from "@aura-protocol/sdk-ts";
import { treasury, execution } from "@aura-protocol/sdk-ts/instructions";
import { parseAuraError, AuraErrorCode } from "@aura-protocol/sdk-ts/errors";
import { EventDiscriminator, parseAuraEvents } from "@aura-protocol/sdk-ts/events";

Coverage

Current generated surface:

  • 161 instructions
  • 32 accounts
  • 140 program errors
  • 4 events

npm test verifies that every IDL instruction has a reachable domain builder.

Build & Test

npm run build      # tsc -> dist/
npm run typecheck  # type-check src + tests (incl. devnet) without emitting
npm test           # tsx --test, offline unit suite (tests/unit)
npm run test:devnet # integration suite (tests/devnet); skips without a payer
npm run lint       # biome check (lint + format + import order)
npm run format     # biome format --write

Tests are organized under tests/:

  • tests/unit/ — offline, deterministic. Builds and verifies every IDL instruction through its generated builder, plus PDAs, account fetchers, errors, events, validation, constants, and the program-surface catalog.
  • tests/devnet/ — real devnet integration per domain. Skips automatically unless a funded payer keypair is found (see tests/support/devnet.ts).
  • tests/support/ — shared helpers (offline client, IDL-driven sample argument generator, devnet harness).

IDL & Codegen

The generated IDL files live under src/generated. Regenerate after an Anchor build, then rebuild the domain modules and program-surface catalog:

npm run generate-idl     # copy aura_core.{json,ts} from the Anchor build
# or on Windows
npm run generate-idl:win

npm run generate-sdk     # regenerate instruction/account/error/event modules,
                         # program-surface.ts, then format with Biome

generate-sdk maps every IDL instruction to a domain via a complete, explicit table and fails loudly if the program adds an instruction that is not yet mapped, so the generated surface can never silently misfile a new instruction.