Token2022Instruction

Enum Token2022Instruction 

Source
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, Vec) are not fully parsed; only primitive fields are extracted.

Variants§

§

InitializeMint

Initialize a new mint (index 0)

Fields

§decimals: u8
§

InitializeAccount

Initialize a new token account (index 1)

§

InitializeMultisig

Initialize a multisig account (index 2)

Fields

§m: u8
§

Transfer

Transfer tokens - DEPRECATED, use TransferChecked (index 3)

Fields

§amount: u64
§

Approve

Approve a delegate (index 4)

Fields

§amount: u64
§

Revoke

Revoke delegate authority (index 5)

§

SetAuthority

Set a new authority (index 6)

Fields

§authority_type: u8
§

MintTo

Mint new tokens (index 7)

Fields

§amount: u64
§

Burn

Burn tokens (index 8)

Fields

§amount: u64
§

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)

Fields

§amount: u64
§decimals: u8
§

ApproveChecked

Approve delegate with decimals check (index 13)

Fields

§amount: u64
§decimals: u8
§

MintToChecked

Mint tokens with decimals check (index 14)

Fields

§amount: u64
§decimals: u8
§

BurnChecked

Burn tokens with decimals check (index 15)

Fields

§amount: u64
§decimals: u8
§

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)

Fields

§m: u8
§

InitializeMint2

Initialize mint without rent sysvar (index 20)

Fields

§decimals: u8
§

GetAccountDataSize

Get required account size (index 21)

§

InitializeImmutableOwner

Initialize immutable owner extension (index 22)

§

AmountToUiAmount

Convert amount to UI amount string (index 23)

Fields

§amount: u64
§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V