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

@p76/batch-sdk

v0.2.2

Published

Encoder, decoder, and inner-instruction helpers for the p-token batch(0xFF) instruction. The same 0xFF that minted $76.

Readme

@p76/batch-sdk

Encoder, decoder, and inner-instruction helpers for the p-token batch(0xFF) instruction. The same 0xFF that minted $76.

npm bundle size

Zero runtime dependencies. Compatible with any Solana web3 client (legacy @solana/web3.js or Anza's @solana/kit).

Install

npm install @p76/batch-sdk

What it does

p-token's batch(0xFF) instruction packs multiple inner token instructions into a single CPI to the token program. This SDK handles the wire format both ways, plus typed helpers for the common inner ops (Transfer, MintTo, Burn, CloseAccount, TransferChecked).

Wire format:

[0xFF] [n_accounts: u8] [data_len: u8] [data ...] [n_accounts: u8] ...

Use

High-level: typed inner builders

import { encodeBatchData, transferInner, closeAccountInner } from '@p76/batch-sdk';

// Three Transfer inners + one CloseAccount inner, all in one batch tx
const batchData = encodeBatchData([
  transferInner(1_000_000n),
  transferInner(2_500_000n),
  transferInner(500_000n),
  closeAccountInner(),
]);
// -> Uint8Array starting with 0xFF, ready to use as TransactionInstruction.data

Place this batchData as the data field of a TransactionInstruction targeting the token program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA). The outer ix's keys must list the per-inner accounts in order: for the example above, [src, dest1, owner, src, dest2, owner, src, dest3, owner, ata_to_close, rent_dest, owner].

Available inner builders

| Builder | Numbers of accounts the outer ix consumes per inner | Wire format | |---|---|---| | transferInner(amount) | 3: [source, dest, owner] | 0x03 + amount LE u64 | | mintToInner(amount) | 3: [mint, dest, mint_authority] | 0x07 + amount LE u64 | | burnInner(amount) | 3: [account, mint, owner] | 0x08 + amount LE u64 | | closeAccountInner() | 3: [account, destination, owner] | 0x09 | | transferCheckedInner(amount, decimals) | 4: [source, mint, dest, owner] | 0x0C + amount LE u64 + decimals u8 |

For other Token program ops not yet wrapped, build the InnerIx manually:

import { encodeBatchData, type InnerIx, TOKEN_IX } from '@p76/batch-sdk';

const customInner: InnerIx = {
  numAccounts: 2,
  data: new Uint8Array([TOKEN_IX.APPROVE, /* ... */]),
};

Low-level: raw encode/decode

import { encodeBatchData, decodeBatchData } from '@p76/batch-sdk';

// Wrap a single MintTo of 76,000,000 atomic units (the $76 genesis tx)
const encoded = encodeBatchData([
  {
    numAccounts: 3, // mint, dest_ata, mint_authority
    data: new Uint8Array([
      0x07,                                            // MintTo disc
      0x00, 0xab, 0x87, 0x04, 0x00, 0x00, 0x00, 0x00,  // amount u64 LE
    ]),
  },
]);
// -> Uint8Array(12) [255, 3, 9, 7, 0, 171, 135, 4, 0, 0, 0, 0]

const inners = decodeBatchData(encoded);
// -> [{ numAccounts: 3, data: Uint8Array(9) [...] }]

What can be wrapped

Inner instructions are dispatched inside the p-token program. They cannot CPI to other programs. Valid inner discriminators (exposed as TOKEN_IX):

| Disc | Op | Builder | |---:|---|---| | 0 | InitializeMint | raw | | 1 | InitializeAccount | raw | | 3 | Transfer | transferInner | | 4 | Approve | raw | | 5 | Revoke | raw | | 6 | SetAuthority | raw | | 7 | MintTo | mintToInner | | 8 | Burn | burnInner | | 9 | CloseAccount | closeAccountInner | | 10 | FreezeAccount | raw | | 11 | ThawAccount | raw | | 12 | TransferChecked | transferCheckedInner | | 15 | BurnChecked | raw | | 17 | SyncNative | raw | | 18 | InitializeAccount3 | raw | | 22 | InitializeImmutableOwner | raw |

CreateAssociatedTokenAccount lives in the ATA program, not p-token, so it cannot be wrapped. See BATCH_FORMAT.md in the parent repo for the dispatch source.

Production proof

Three batch(0xFF) inner ops verified end-to-end on Solana mainnet by the p76 ATA Factory app:

| Inner | First mainnet tx | |---|---| | MintTo | 5cqt...iW8 ($76 genesis, 14 May 2026) | | Transfer | 3ZGf...Nn2G | | CloseAccount | 2QWh...3ABG |

Benchmarks

Per-ATA CU measured at ~15,500 CU on devnet (post-SIMD-0266 p-token activation). Mainnet observed even lower at 8-12k for createATA, ~2.5k for CloseAccount inside a batch. See BENCHMARKS.md for the full table and the reproducible script.

Why this exists

$76 is a memecoin minted via the first-ever batch(0xFF) instruction on Solana mainnet (May 2026). This package was extracted from the p76 ATA Factory app so other Solana projects can build on the same primitive without reimplementing the wire format.

Credits

batch(0xFF) is a p-token instruction. p-token is the Pinocchio-based Token program rewrite shipped by Anza and activated on Solana mainnet on 2026-05-13 via SIMD-0266. This SDK encodes the wire format; the runtime that dispatches every batch call is Anza's implementation.

Changelog

  • 0.2.0 (2026-05-22): typed inner builders (transferInner, mintToInner, burnInner, closeAccountInner, transferCheckedInner), TOKEN_IX constants. Wire encoder/decoder unchanged.
  • 0.1.0 (2026-05-22): initial release. encodeBatchData + decodeBatchData.

License

MIT.