Registry / crypto / spl-token-2022

spl-token-2022

JSON →
library10.0.0rscratesunverified

Solana Program Library Token 2022 provides an extended token program with additional features for the Solana blockchain.

# Cargo.toml [dependencies] spl-token-2022 = "10.0.0"
INSTALL
IMPORT
SIG · SPL-TOKEN-2022
S
spl-token-2022
cryptorustv10.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TokenInstruction
use spl_token_2022::instruction::TokenInstruction;

Creates a token mint initialization instruction using SPL Token 2022.

use spl_token_2022::instruction::TokenInstruction; fn main() { let instruction = TokenInstruction::InitializeMint { decimals: 9, mint_authority: solana_program::pubkey::Pubkey::new_unique(), freeze_authority: None }; println!("Token instruction created"); }
Debug
Known issues
gotchaRequires Solana runtime environment and specific feature flags for extended token functionality.
fix
Ensure your project depends on solana-program and enables the 'no-entrypoint' feature if not deploying as a program.
affects: >=10.0.0
Upgrade
Version history
10.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
14
Amazon
1
Resources
spl-token-2022 — cargo add spl-token-2022 · libregistry