Skip to main content

Module token

Module token 

Source
Expand description

SPL Token helpers.

Structs§

ApproveChecked
Builder for SPL Token ApproveChecked (instruction index 13).
BurnChecked
Builder for SPL Token BurnChecked (instruction index 15).
CloseAccount
Builder for SPL Token CloseAccount (instruction index 9).
InitializeAccount
Builder for SPL Token InitializeAccount (instruction index 1).
InterfaceMint
Polymorphic SPL Token / Token-2022 mint overlay.
InterfaceTokenAccount
Polymorphic SPL Token / Token-2022 token-account overlay.
MintToChecked
Builder for SPL Token MintToChecked (instruction index 14).
Revoke
Builder for SPL Token Revoke (instruction index 5).
TransferChecked
Builder for SPL Token TransferChecked (instruction index 12).

Enums§

TokenProgramKind
Which token program owns this account.

Constants§

TOKEN_PROGRAM_ID
SPL Token program address.

Functions§

interface_transfer_checked
Polymorphic TransferChecked CPI that dispatches to the program that owns the source token account.
interface_transfer_checked_signed
PDA-signing variant of interface_transfer_checked.
require_mint_authority
Verify an SPL Mint account’s mint_authority COption field matches expected_authority.
require_mint_decimals
Verify an SPL Mint account’s decimals byte matches expected.
require_mint_freeze_authority
Verify an SPL Mint account’s freeze_authority COption field matches expected_freeze.
require_token_authority
Verify an SPL Token account’s owner field matches authority.key().
require_token_mint
Verify an SPL Token account’s mint field matches expected_mint.
require_token_owner_eq
Verify an SPL Token account’s owner field matches a pubkey supplied directly (i.e. not wrapped in an AccountView).