Registry / other / anchor-spl

anchor-spl

JSON →
library1.0.2rscratesunverified

CPI clients for Solana Program Library (SPL) programs, used with the Anchor framework.

# Cargo.toml [dependencies] anchor-spl = "1.0.2"
INSTALL
IMPORT
SIG · ANCHOR-SPL
A
anchor-spl
otherrustv1.0.2
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.

Token
use anchor_spl::token::Token;

Uses the Token program interface from Anchor SPL.

use anchor_spl::token::Token; use anchor_lang::prelude::*; #[derive(Accounts)] pub struct Example { pub token_program: Program<'info, Token>, } fn main() { println!("Anchor SPL token program interface"); }
Debug
Known issues
gotchaRequires the `anchor-lang` crate and Solana runtime environment.
fix
Add `anchor-lang` and `anchor-spl` to Cargo.toml and ensure you are building for Solana.
affects: >=1.0.0
Upgrade
Version history
1.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Meta
2
OpenAI (training)
1
Resources
anchor-spl — cargo add anchor-spl · libregistry