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

@superstateinc/allowlist

v0.1.1

Published

TypeScript library for interacting with the Superstate Allowlist program on Solana

Downloads

45

Readme

Superstate Allowlist Program

TypeScript library for interacting with the Superstate Allowlist program on Solana. This library provides utilities for creating instructions, deriving PDAs, and working with allowlist functionality for SPL Token 2022 mints.

Installation

npm install @superstateinc/allowlist

Usage

Creating a Thaw Instruction

The main functionality of this library is to create thaw instructions for token accounts:

import {
  createThawInstruction,
  ThawInstructionParams,
  TOKEN_2022_PROGRAM_ID
} from '@superstateinc/allowlist';
import { PublicKey } from '@solana/web3.js';

// Define your parameters
const params: ThawInstructionParams = {
  allowlistProgramId: new PublicKey('SUPERSTATE_ALLOWLIST_PROGRAM_ID'),
  mint: new PublicKey('YOUR_TOKEN_MINT'),
  userTokenAccountOwner: new PublicKey('USER_WALLET_ADDRESS'),
  userTokenAccount: new PublicKey('USER_TOKEN_ACCOUNT'),
  tokenProgramId: TOKEN_2022_PROGRAM_ID, // Optional, defaults to Token 2022
};

// Create the instruction
const thawInstruction = createThawInstruction(params);

// Add to your transaction
transaction.add(thawInstruction);

PDA Derivation

You can also derive Program Derived Addresses (PDAs) used by the allowlist program:

import {
  getAllowlistProgramPda,
  getPrivateAllowlistPda,
  getPublicAllowedAccountPda,
  getPrivateAllowedAccountPda,
  getAdminPda
} from '@superstateinc/allowlist';
import { PublicKey } from '@solana/web3.js';

const programId = new PublicKey('SUPERSTATE_ALLOWLIST_PROGRAM_ID');
const mint = new PublicKey('YOUR_TOKEN_MINT');
const userWallet = new PublicKey('USER_WALLET_ADDRESS');

// Derive various PDAs
const [allowlistProgramPda, bump1] = getAllowlistProgramPda(programId);
const [privateAllowlistPda, bump2] = getPrivateAllowlistPda(mint, programId);
const [publicAllowedPda, bump3] = getPublicAllowedAccountPda(userWallet, programId);
const [privateAllowedPda, bump4] = getPrivateAllowedAccountPda(userWallet, mint, programId);
const [adminPda, bump5] = getAdminPda(programId);

Constants

The library exports useful constants:

import {
  TOKEN_2022_PROGRAM_ID,
  SYSTEM_PROGRAM_ID,
  AllowlistInstruction
} from '@superstateinc/allowlist';

console.log('Token 2022 Program:', TOKEN_2022_PROGRAM_ID.toString());
console.log('Thaw instruction discriminant:', AllowlistInstruction.Thaw);

API Reference

Functions

createThawInstruction(params: ThawInstructionParams): TransactionInstruction

Creates a thaw instruction for the allowlist program. This instruction thaws a user's token account if they are allowed on either the public allowlist or the private allowlist for the specific mint.

PDA Derivation Functions

  • getAllowlistProgramPda(programId: PublicKey): [PublicKey, number]
  • getPrivateAllowlistPda(mint: PublicKey, programId: PublicKey): [PublicKey, number]
  • getPublicAllowedAccountPda(userAccount: PublicKey, programId: PublicKey): [PublicKey, number]
  • getPrivateAllowedAccountPda(userAccount: PublicKey, mint: PublicKey, programId: PublicKey): [PublicKey, number]
  • getAdminPda(programId: PublicKey): [PublicKey, number]

Types

ThawInstructionParams

interface ThawInstructionParams {
  allowlistProgramId: PublicKey;
  mint: PublicKey;
  userTokenAccountOwner: PublicKey;
  userTokenAccount: PublicKey;
  tokenProgramId?: PublicKey;
}

Account State Interfaces

  • Admin
  • PrivateAllowlist
  • PublicAllowedAccount
  • PrivateAllowedAccount

Constants

  • TOKEN_2022_PROGRAM_ID: SPL Token 2022 program ID
  • SYSTEM_PROGRAM_ID: System program ID
  • AllowlistInstruction: Enum of all allowlist instruction discriminants

How It Works

The allowlist program supports both public and private allowlists:

  • Public Allowlist: A global allowlist that applies to all tokens
  • Private Allowlist: Token-specific allowlists for private instruments

The thaw instruction automatically:

  1. Checks if the user is on the public allowlist
  2. Checks if the user is on the private allowlist for the specific mint
  3. Thaws the token account if the user is allowed

Requirements

  • Solana Web3.js v1.87.6+
  • SPL Token v0.4.1+
  • Node.js 16+

License

MIT