pub enum Token2022Instruction {
Show 45 variants
InitializeMint {
decimals: u8,
},
InitializeAccount,
InitializeMultisig {
m: u8,
},
Transfer {
amount: u64,
},
Approve {
amount: u64,
},
Revoke,
SetAuthority {
authority_type: u8,
},
MintTo {
amount: u64,
},
Burn {
amount: u64,
},
CloseAccount,
FreezeAccount,
ThawAccount,
TransferChecked {
amount: u64,
decimals: u8,
},
ApproveChecked {
amount: u64,
decimals: u8,
},
MintToChecked {
amount: u64,
decimals: u8,
},
BurnChecked {
amount: u64,
decimals: u8,
},
InitializeAccount2,
SyncNative,
InitializeAccount3,
InitializeMultisig2 {
m: u8,
},
InitializeMint2 {
decimals: u8,
},
GetAccountDataSize,
InitializeImmutableOwner,
AmountToUiAmount {
amount: u64,
},
UiAmountToAmount,
InitializeMintCloseAuthority,
TransferFeeExtension,
ConfidentialTransferExtension,
DefaultAccountStateExtension,
Reallocate,
MemoTransferExtension,
CreateNativeMint,
InitializeNonTransferableMint,
InterestBearingMintExtension,
CpiGuardExtension,
InitializePermanentDelegate,
TransferHookExtension,
ConfidentialTransferFeeExtension,
WithdrawExcessLamports,
MetadataPointerExtension,
GroupPointerExtension,
GroupMemberPointerExtension,
ConfidentialMintBurnExtension,
ScaledUiAmountExtension,
PausableExtension,
}Expand description
Token 2022 program instructions.
The Token 2022 program uses a 1-byte discriminator (variant index). Each variant’s discriminator is its position in this enum (0, 1, 2, …).
Token 2022 is a superset of SPL Token (indices 0-24 are compatible). Indices 25+ are Token Extensions specific instructions.
Note: Complex types (Pubkey, COption
Variants§
InitializeMint
Initialize a new mint (index 0)
InitializeAccount
Initialize a new token account (index 1)
InitializeMultisig
Initialize a multisig account (index 2)
Transfer
Transfer tokens - DEPRECATED, use TransferChecked (index 3)
Approve
Approve a delegate (index 4)
Revoke
Revoke delegate authority (index 5)
SetAuthority
Set a new authority (index 6)
Fields
MintTo
Mint new tokens (index 7)
Burn
Burn tokens (index 8)
CloseAccount
Close a token account (index 9)
FreezeAccount
Freeze a token account (index 10)
ThawAccount
Thaw a frozen token account (index 11)
TransferChecked
Transfer tokens with decimals check (index 12)
ApproveChecked
Approve delegate with decimals check (index 13)
MintToChecked
Mint tokens with decimals check (index 14)
BurnChecked
Burn tokens with decimals check (index 15)
InitializeAccount2
Initialize account with owner in data (index 16)
SyncNative
Sync native SOL balance (index 17)
InitializeAccount3
Initialize account without rent sysvar (index 18)
InitializeMultisig2
Initialize multisig without rent sysvar (index 19)
InitializeMint2
Initialize mint without rent sysvar (index 20)
GetAccountDataSize
Get required account size (index 21)
InitializeImmutableOwner
Initialize immutable owner extension (index 22)
AmountToUiAmount
Convert amount to UI amount string (index 23)
UiAmountToAmount
Convert UI amount string to amount (index 24)
InitializeMintCloseAuthority
Initialize mint close authority extension (index 25)
TransferFeeExtension
Transfer fee extension instruction prefix (index 26)
ConfidentialTransferExtension
Confidential transfer extension instruction prefix (index 27)
DefaultAccountStateExtension
Default account state extension instruction prefix (index 28)
Reallocate
Reallocate account for extensions (index 29)
MemoTransferExtension
Memo transfer extension instruction prefix (index 30)
CreateNativeMint
Create the native mint (index 31)
InitializeNonTransferableMint
Initialize non-transferable mint extension (index 32)
InterestBearingMintExtension
Interest bearing mint extension instruction prefix (index 33)
CpiGuardExtension
CPI guard extension instruction prefix (index 34)
InitializePermanentDelegate
Initialize permanent delegate extension (index 35)
TransferHookExtension
Transfer hook extension instruction prefix (index 36)
ConfidentialTransferFeeExtension
Confidential transfer fee extension instruction prefix (index 37)
WithdrawExcessLamports
Withdraw excess lamports from token account (index 38)
MetadataPointerExtension
Metadata pointer extension instruction prefix (index 39)
GroupPointerExtension
Group pointer extension instruction prefix (index 40)
GroupMemberPointerExtension
Group member pointer extension instruction prefix (index 41)
ConfidentialMintBurnExtension
Confidential mint/burn extension instruction prefix (index 42)
ScaledUiAmountExtension
Scaled UI amount extension instruction prefix (index 43)
PausableExtension
Pausable extension instruction prefix (index 44)
Auto Trait Implementations§
impl Freeze for Token2022Instruction
impl RefUnwindSafe for Token2022Instruction
impl Send for Token2022Instruction
impl Sync for Token2022Instruction
impl Unpin for Token2022Instruction
impl UnwindSafe for Token2022Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more