Token-2022 IDL

splv0.9.1Core / Standard
Program Address
TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
On-chain

SPL Token-2022 is the next-generation token program on Solana with rich extension support including transfer fees, confidential transfers, interest-bearing tokens, non-transferable tokens, and permanent delegates.

43
Instructions
3
Accounts
0
Events
8
Types

Instructions

initializeMintinitializeAccountinitializeMultisigtransferapproverevokesetAuthoritymintToburncloseAccountfreezeAccountthawAccount+31 more

Account Types

MintAccountMultisig

Integration Examples

Use the Token-2022 IDL in your application with these code examples for TypeScript, Rust, and Python.

import { Connection, PublicKey } from "@solana/web3.js";
import { Program, AnchorProvider, Idl } from "@coral-xyz/anchor";

// Load the Token-2022 IDL
import idl from "./token-2022.json";

const PROGRAM_ID = new PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");

// Set up the provider and program
const connection = new Connection("https://api.mainnet-beta.solana.com");
const provider = new AnchorProvider(connection, wallet, {
  commitment: "confirmed",
});
const program = new Program(idl as Idl, provider);

// Fetch and decode an account
const accountData = await program.account.token_2022
  .fetch(accountPublicKey);
console.log("Account data:", accountData);

// Build and send an instruction
const tx = await program.methods
  .initialize(/* ...args */)
  .accounts({
    /* ...required accounts */
  })
  .rpc();
console.log("Transaction signature:", tx);

IDL JSON Preview

token-2022.json
{
  "version": "0.9.1",
  "name": "spl_token_2022",
  "instructions": [
    {
      "name": "initializeMint",
      "accounts": [
        {
          "name": "mint",
          "isMut": true,
          "isSigner": false
        },
        {
          "name": "rent",
          "isMut": false,
          "isSigner": false
        }
      ],
      "args": [
        {
          "name": "decimals",
          "type": "u8"
        },
        {
          "name": "mintAuthority",
          "type": "publicKey"
        },
        {
          "name": "freezeAuthority",
          "type": {
...

Frequently Asked Questions

What is the Token-2022 IDL?

The Token-2022 IDL (Interface Definition Language) is a JSON schema that defines the on-chain program interface for the Token-2022 smart contract on Solana. It describes all available instructions, account structures, events, and custom types that developers need to interact with the Token-2022 program. This IDL contains 43 instructions, 3 account types, 0 events, and 8 type definitions.

How do I use the Token-2022 IDL in my project?

Download the JSON file and import it in your project. With TypeScript, use the @coral-xyz/anchor package to create a Program instance. In Rust, use anchor-client. For Python, use anchorpy. See the integration examples above for complete code snippets in all three languages.

What is the Token-2022 program address on Solana?

The Token-2022 program is deployed at address TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb on Solana mainnet. You can verify this on any Solana block explorer.

What version of the Token-2022 IDL is this?

This is version 0.9.1 of the Token-2022 IDL. IDL versions correspond to specific program deployments and may be updated as the protocol evolves. Always verify compatibility with the on-chain program version before integrating.

Build on Solana with AllenHark

Interacting with Token-2022 on-chain? Stream program accounts and transactions in real time with Yellowstone gRPC, query state over our staked Solana RPC, or land transactions with ShredStream. Automate trading against these protocols with Flare Bot Studio or the PumpFun Sniper.