spl_token_2022

package
v0.0.0-...-3968f94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ACCOUNT_SIZE = 165
View Source
const MINT_SIZE = 82
View Source
const ProgramName = "spl_token_2022"

Variables

View Source
var (
	Instruction_InitializeMint                   uint8 = 0
	Instruction_InitializeAccount                uint8 = 1
	Instruction_InitializeMultisig               uint8 = 2
	Instruction_Transfer                         uint8 = 3
	Instruction_Approve                          uint8 = 4
	Instruction_Revoke                           uint8 = 5
	Instruction_SetAuthority                     uint8 = 6
	Instruction_MintTo                           uint8 = 7
	Instruction_Burn                             uint8 = 8
	Instruction_CloseAccount                     uint8 = 9
	Instruction_FreezeAccount                    uint8 = 10
	Instruction_ThawAccount                      uint8 = 11
	Instruction_TransferChecked                  uint8 = 12
	Instruction_ApproveChecked                   uint8 = 13
	Instruction_MintToChecked                    uint8 = 14
	Instruction_BurnChecked                      uint8 = 15
	Instruction_InitializeAccount2               uint8 = 16
	Instruction_SyncNative                       uint8 = 17
	Instruction_InitializeAccount3               uint8 = 18
	Instruction_InitializeMultisig2              uint8 = 19
	Instruction_InitializeMint2                  uint8 = 20
	Instruction_GetAccountDataSize               uint8 = 21
	Instruction_InitializeImmutableOwner         uint8 = 22
	Instruction_AmountToUiAmount                 uint8 = 23
	Instruction_UiAmountToAmount                 uint8 = 24
	Instruction_InitializeMintCloseAuthority     uint8 = 25
	Instruction_TransferFeeExtension             uint8 = 26
	Instruction_ConfidentialTransferExtension    uint8 = 27
	Instruction_DefaultAccountStateExtension     uint8 = 28
	Instruction_Reallocate                       uint8 = 29
	Instruction_MemoTransferExtension            uint8 = 30
	Instruction_CreateNativeMint                 uint8 = 31
	Instruction_InitializeNonTransferableMint    uint8 = 32
	Instruction_InterestBearingMintExtension     uint8 = 33
	Instruction_CpiGuardExtension                uint8 = 34
	Instruction_InitializePermanentDelegate      uint8 = 35
	Instruction_TransferHookExtension            uint8 = 36
	Instruction_ConfidentialTransferFeeExtension uint8 = 37
	Instruction_WithdrawExcessLamports           uint8 = 38
	Instruction_MetadataPointerExtension         uint8 = 39
	Instruction_GroupPointerExtension            uint8 = 40
	Instruction_GroupMemberPointerExtension      uint8 = 41
)
View Source
var InstructionImplDef = binary.NewVariantDefinition(binary.Uint8TypeIDEncoding, []binary.VariantType{
	{
		"initialize_mint", (*InitializeMint)(nil),
	},
	{
		"initialize_account", (*InitializeAccount)(nil),
	},
	{
		"initialize_multisig", (*InitializeMultisig)(nil),
	},
	{
		"transfer", (*Transfer)(nil),
	},
	{
		"approve", (*Approve)(nil),
	},
	{
		"revoke", (*Revoke)(nil),
	},
	{
		"set_authority", (*SetAuthority)(nil),
	},
	{
		"mint_to", (*MintTo)(nil),
	},
	{
		"burn", (*Burn)(nil),
	},
	{
		"close_account", (*CloseAccount)(nil),
	},
	{
		"freeze_account", (*FreezeAccount)(nil),
	},
	{
		"thaw_account", (*ThawAccount)(nil),
	},
	{
		"transfer_checked", (*TransferChecked)(nil),
	},
	{
		"approve_checked", (*ApproveChecked)(nil),
	},
	{
		"mint_to_checked", (*MintToChecked)(nil),
	},
	{
		"burn_checked", (*BurnChecked)(nil),
	},
	{
		"initialize_account2", (*InitializeAccount2)(nil),
	},
	{
		"sync_native", (*SyncNative)(nil),
	},
	{
		"initialize_account3", (*InitializeAccount3)(nil),
	},
	{
		"initialize_multisig2", (*InitializeMultisig2)(nil),
	},
	{
		"initialize_mint2", (*InitializeMint2)(nil),
	},
	{
		"get_account_data_size", (*GetAccountDataSize)(nil),
	},
	{
		"initialize_immutable_owner", (*InitializeImmutableOwner)(nil),
	},
	{
		"amount_to_ui_amount", (*AmountToUiAmount)(nil),
	},
	{
		"ui_amount_to_amount", (*UiAmountToAmount)(nil),
	},
	{
		"initialize_mint_close_authority", (*InitializeMintCloseAuthority)(nil),
	},
	{
		"transfer_fee_extension", (*TransferFeeExtension)(nil),
	},
	{
		"confidential_transfer_extension", (*ConfidentialTransferExtension)(nil),
	},
	{
		"default_account_state_extension", (*DefaultAccountStateExtension)(nil),
	},
	{
		"reallocate", (*Reallocate)(nil),
	},
	{
		"memo_transfer_extension", (*MemoTransferExtension)(nil),
	},
	{
		"create_native_mint", (*CreateNativeMint)(nil),
	},
	{
		"initialize_non_transferable_mint", (*InitializeNonTransferableMint)(nil),
	},
	{
		"interest_bearing_mint_extension", (*InterestBearingMintExtension)(nil),
	},
	{
		"cpi_guard_extension", (*CpiGuardExtension)(nil),
	},
	{
		"initialize_permanent_delegate", (*InitializePermanentDelegate)(nil),
	},
	{
		"transfer_hook_extension", (*TransferHookExtension)(nil),
	},
	{
		"confidential_transfer_fee_extension", (*ConfidentialTransferFeeExtension)(nil),
	},
	{
		"withdraw_excess_lamports", (*WithdrawExcessLamports)(nil),
	},
	{
		"metadata_pointer_extension", (*MetadataPointerExtension)(nil),
	},
	{
		"group_pointer_extension", (*GroupPointerExtension)(nil),
	},
	{
		"group_member_pointer_extension", (*GroupMemberPointerExtension)(nil),
	},
})
View Source
var ProgramID common.PublicKey = common.MustPublicKeyFromBase58("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb")

Functions

func InstructionIDToName

func InstructionIDToName(id uint8) string

InstructionIDToName returns the name of the instruction given its ID.

func SetProgramID

func SetProgramID(pubkey common.PublicKey)

Types

type Account

type Account struct {
	// The mint associated with this account
	Mint common.PublicKey
	// The owner of this account.
	Owner common.PublicKey
	// The amount of tokens this account holds.
	Amount uint64
	// If `delegate` is `Some` then `delegated_amount` represents
	// the amount authorized by the delegate
	Delegate *common.PublicKey `bin:"optional"`
	// The account's state
	State AccountState
	// If is_some, this is a native token, and the value logs the rent-exempt
	// reserve. An Account is required to be rent-exempt, so the value is
	// used by the Processor to ensure that wrapped SOL accounts do not
	// drop below this threshold.
	IsNative *uint64 `bin:"optional"`
	// The amount delegated
	DelegatedAmount uint64
	// Optional authority to close the account.
	CloseAuthority *common.PublicKey `bin:"optional"`
}

Account Struct Account data.

func (*Account) MarshalWithEncoder

func (obj *Account) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Account) UnmarshalWithDecoder

func (obj *Account) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

type AccountDecryptionError

type AccountDecryptionError struct{}

AccountDecryptionError Error: 53 `Failed to decrypt a confidential transfer account`

func (AccountDecryptionError) Code

func (e AccountDecryptionError) Code() int

func (AccountDecryptionError) Error

func (e AccountDecryptionError) Error() string

type AccountFrozenError

type AccountFrozenError struct{}

AccountFrozenError Error: 17 `Account is frozen`

func (AccountFrozenError) Code

func (e AccountFrozenError) Code() int

func (AccountFrozenError) Error

func (e AccountFrozenError) Error() string

type AccountHasWithheldTransferFeesError

type AccountHasWithheldTransferFeesError struct{}

AccountHasWithheldTransferFeesError Error: 35 `An account can only be closed if its withheld fee balance is zero, harvest fees to the mint and try again`

func (AccountHasWithheldTransferFeesError) Code

func (AccountHasWithheldTransferFeesError) Error

type AccountState

type AccountState binary.BorshEnum

AccountState Enum

const (
	AccountStateUninitialized AccountState = iota
	AccountStateInitialized
	AccountStateFrozen
)

func (AccountState) String

func (value AccountState) String() string

type AlreadyInUseError

type AlreadyInUseError struct{}

AlreadyInUseError Error: 6 `Already in use`

func (AlreadyInUseError) Code

func (e AlreadyInUseError) Code() int

func (AlreadyInUseError) Error

func (e AlreadyInUseError) Error() string

type AmountToUiAmount

type AmountToUiAmount struct {
	Amount *uint64
	// [0] = [] mint `The mint to calculate for`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

AmountToUiAmount Instruction

func NewAmountToUiAmountInstruction

func NewAmountToUiAmountInstruction(
	amount uint64,
	mint common.PublicKey,
) *AmountToUiAmount

NewAmountToUiAmountInstruction

Parameters:

amount:
mint: The mint to calculate for

func NewAmountToUiAmountInstructionBuilder

func NewAmountToUiAmountInstructionBuilder() *AmountToUiAmount

NewAmountToUiAmountInstructionBuilder creates a new `AmountToUiAmount` instruction builder.

func (*AmountToUiAmount) Build

func (obj *AmountToUiAmount) Build() *Instruction

func (*AmountToUiAmount) EncodeToTree

func (obj *AmountToUiAmount) EncodeToTree(parent treeout.Branches)

func (*AmountToUiAmount) GetMintAccount

func (obj *AmountToUiAmount) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to calculate for

func (*AmountToUiAmount) MarshalWithEncoder

func (obj *AmountToUiAmount) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*AmountToUiAmount) SetAmount

func (obj *AmountToUiAmount) SetAmount(amount uint64) *AmountToUiAmount

SetAmount sets the "amount" parameter.

func (*AmountToUiAmount) SetMintAccount

func (obj *AmountToUiAmount) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *AmountToUiAmount

SetMintAccount sets the "mint" parameter. The mint to calculate for

func (*AmountToUiAmount) SetProgramId

func (obj *AmountToUiAmount) SetProgramId(programId *common.PublicKey) *AmountToUiAmount

func (*AmountToUiAmount) UnmarshalWithDecoder

func (obj *AmountToUiAmount) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*AmountToUiAmount) Validate

func (obj *AmountToUiAmount) Validate() error

func (*AmountToUiAmount) ValidateAndBuild

func (obj *AmountToUiAmount) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Approve

type Approve struct {
	Amount *uint64
	// [0] = [WRITE] source `The source account.`
	// [1] = [] delegate `The delegate.`
	// [2] = [SIGNER] authority `The source account owner.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Approve Instruction

func NewApproveInstruction

func NewApproveInstruction(
	amount uint64,
	source common.PublicKey,
	delegate common.PublicKey,
	authority common.PublicKey,
) *Approve

NewApproveInstruction

Parameters:

amount:
source: The source account.
delegate: The delegate.
authority: The source account owner.

func NewApproveInstructionBuilder

func NewApproveInstructionBuilder() *Approve

NewApproveInstructionBuilder creates a new `Approve` instruction builder.

func (*Approve) Build

func (obj *Approve) Build() *Instruction

func (*Approve) EncodeToTree

func (obj *Approve) EncodeToTree(parent treeout.Branches)

func (*Approve) GetAuthorityAccount

func (obj *Approve) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The source account owner.

func (*Approve) GetDelegateAccount

func (obj *Approve) GetDelegateAccount() *common.AccountMeta

GetDelegateAccount gets the "delegate" parameter. The delegate.

func (*Approve) GetSourceAccount

func (obj *Approve) GetSourceAccount() *common.AccountMeta

GetSourceAccount gets the "source" parameter. The source account.

func (*Approve) MarshalWithEncoder

func (obj *Approve) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Approve) SetAmount

func (obj *Approve) SetAmount(amount uint64) *Approve

SetAmount sets the "amount" parameter.

func (*Approve) SetAuthorityAccount

func (obj *Approve) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *Approve

SetAuthorityAccount sets the "authority" parameter. The source account owner.

func (*Approve) SetDelegateAccount

func (obj *Approve) SetDelegateAccount(delegate common.PublicKey) *Approve

SetDelegateAccount sets the "delegate" parameter. The delegate.

func (*Approve) SetProgramId

func (obj *Approve) SetProgramId(programId *common.PublicKey) *Approve

func (*Approve) SetSourceAccount

func (obj *Approve) SetSourceAccount(source common.PublicKey) *Approve

SetSourceAccount sets the "source" parameter. The source account.

func (*Approve) UnmarshalWithDecoder

func (obj *Approve) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*Approve) Validate

func (obj *Approve) Validate() error

func (*Approve) ValidateAndBuild

func (obj *Approve) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type ApproveChecked

type ApproveChecked struct {
	Amount   *uint64
	Decimals *uint64
	// [0] = [WRITE] source `The source account.`
	// [1] = [] mint `The token mint.`
	// [2] = [] delegate `The delegate.`
	// [3] = [SIGNER] authority `The source account owner.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

ApproveChecked Instruction

func NewApproveCheckedInstruction

func NewApproveCheckedInstruction(
	amount uint64,
	decimals uint64,
	source common.PublicKey,
	mint common.PublicKey,
	delegate common.PublicKey,
	authority common.PublicKey,
) *ApproveChecked

NewApproveCheckedInstruction

Parameters:

amount:
decimals:
source: The source account.
mint: The token mint.
delegate: The delegate.
authority: The source account owner.

func NewApproveCheckedInstructionBuilder

func NewApproveCheckedInstructionBuilder() *ApproveChecked

NewApproveCheckedInstructionBuilder creates a new `ApproveChecked` instruction builder.

func (*ApproveChecked) Build

func (obj *ApproveChecked) Build() *Instruction

func (*ApproveChecked) EncodeToTree

func (obj *ApproveChecked) EncodeToTree(parent treeout.Branches)

func (*ApproveChecked) GetAuthorityAccount

func (obj *ApproveChecked) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The source account owner.

func (*ApproveChecked) GetDelegateAccount

func (obj *ApproveChecked) GetDelegateAccount() *common.AccountMeta

GetDelegateAccount gets the "delegate" parameter. The delegate.

func (*ApproveChecked) GetMintAccount

func (obj *ApproveChecked) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The token mint.

func (*ApproveChecked) GetSourceAccount

func (obj *ApproveChecked) GetSourceAccount() *common.AccountMeta

GetSourceAccount gets the "source" parameter. The source account.

func (*ApproveChecked) MarshalWithEncoder

func (obj *ApproveChecked) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*ApproveChecked) SetAmount

func (obj *ApproveChecked) SetAmount(amount uint64) *ApproveChecked

SetAmount sets the "amount" parameter.

func (*ApproveChecked) SetAuthorityAccount

func (obj *ApproveChecked) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *ApproveChecked

SetAuthorityAccount sets the "authority" parameter. The source account owner.

func (*ApproveChecked) SetDecimals

func (obj *ApproveChecked) SetDecimals(decimals uint64) *ApproveChecked

SetDecimals sets the "decimals" parameter.

func (*ApproveChecked) SetDelegateAccount

func (obj *ApproveChecked) SetDelegateAccount(delegate common.PublicKey) *ApproveChecked

SetDelegateAccount sets the "delegate" parameter. The delegate.

func (*ApproveChecked) SetMintAccount

func (obj *ApproveChecked) SetMintAccount(mint common.PublicKey) *ApproveChecked

SetMintAccount sets the "mint" parameter. The token mint.

func (*ApproveChecked) SetProgramId

func (obj *ApproveChecked) SetProgramId(programId *common.PublicKey) *ApproveChecked

func (*ApproveChecked) SetSourceAccount

func (obj *ApproveChecked) SetSourceAccount(source common.PublicKey) *ApproveChecked

SetSourceAccount sets the "source" parameter. The source account.

func (*ApproveChecked) UnmarshalWithDecoder

func (obj *ApproveChecked) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*ApproveChecked) Validate

func (obj *ApproveChecked) Validate() error

func (*ApproveChecked) ValidateAndBuild

func (obj *ApproveChecked) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type AuthorityType

type AuthorityType binary.BorshEnum

AuthorityType Enum

const (
	AuthorityTypeMintTokens AuthorityType = iota
	AuthorityTypeFreezeAccount
	AuthorityTypeAccountOwner
	AuthorityTypeCloseAccount
	AuthorityTypeTransferFeeConfig
	AuthorityTypeWithheldWithdraw
	AuthorityTypeCloseMint
	AuthorityTypeInterestRate
	AuthorityTypePermanentDelegate
	AuthorityTypeConfidentialTransferMint
	AuthorityTypeTransferHookProgramId
	AuthorityTypeConfidentialTransferFeeConfig
	AuthorityTypeMetadataPointer
	AuthorityTypeGroupPointer
	AuthorityTypeGroupMemberPointer
)

func (AuthorityType) String

func (value AuthorityType) String() string

type AuthorityTypeNotSupportedError

type AuthorityTypeNotSupportedError struct{}

AuthorityTypeNotSupportedError Error: 15 `Account does not support specified authority type`

func (AuthorityTypeNotSupportedError) Code

func (AuthorityTypeNotSupportedError) Error

type Burn

type Burn struct {
	Amount *uint64
	// [0] = [WRITE] burnFrom `The account to burn from.`
	// [1] = [WRITE] mint `The token mint.`
	// [2] = [SIGNER] authority `The account's owner/delegate.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Burn Instruction

func NewBurnInstruction

func NewBurnInstruction(
	amount uint64,
	burnFrom common.PublicKey,
	mint common.PublicKey,
	authority common.PublicKey,
) *Burn

NewBurnInstruction

Parameters:

amount:
burnFrom: The account to burn from.
mint: The token mint.
authority: The account's owner/delegate.

func NewBurnInstructionBuilder

func NewBurnInstructionBuilder() *Burn

NewBurnInstructionBuilder creates a new `Burn` instruction builder.

func (*Burn) Build

func (obj *Burn) Build() *Instruction

func (*Burn) EncodeToTree

func (obj *Burn) EncodeToTree(parent treeout.Branches)

func (*Burn) GetAuthorityAccount

func (obj *Burn) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The account's owner/delegate.

func (*Burn) GetBurnFromAccount

func (obj *Burn) GetBurnFromAccount() *common.AccountMeta

GetBurnFromAccount gets the "burnFrom" parameter. The account to burn from.

func (*Burn) GetMintAccount

func (obj *Burn) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The token mint.

func (*Burn) MarshalWithEncoder

func (obj *Burn) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Burn) SetAmount

func (obj *Burn) SetAmount(amount uint64) *Burn

SetAmount sets the "amount" parameter.

func (*Burn) SetAuthorityAccount

func (obj *Burn) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *Burn

SetAuthorityAccount sets the "authority" parameter. The account's owner/delegate.

func (*Burn) SetBurnFromAccount

func (obj *Burn) SetBurnFromAccount(burnFrom common.PublicKey) *Burn

SetBurnFromAccount sets the "burnFrom" parameter. The account to burn from.

func (*Burn) SetMintAccount

func (obj *Burn) SetMintAccount(mint common.PublicKey) *Burn

SetMintAccount sets the "mint" parameter. The token mint.

func (*Burn) SetProgramId

func (obj *Burn) SetProgramId(programId *common.PublicKey) *Burn

func (*Burn) UnmarshalWithDecoder

func (obj *Burn) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*Burn) Validate

func (obj *Burn) Validate() error

func (*Burn) ValidateAndBuild

func (obj *Burn) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type BurnChecked

type BurnChecked struct {
	Amount   *uint64
	Decimals *uint64
	// [0] = [WRITE] burnFrom `The account to burn from.`
	// [1] = [WRITE] mint `The token mint.`
	// [2] = [SIGNER] authority `The account's owner/delegate.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

BurnChecked Instruction

func NewBurnCheckedInstruction

func NewBurnCheckedInstruction(
	amount uint64,
	decimals uint64,
	burnFrom common.PublicKey,
	mint common.PublicKey,
	authority common.PublicKey,
) *BurnChecked

NewBurnCheckedInstruction

Parameters:

amount:
decimals:
burnFrom: The account to burn from.
mint: The token mint.
authority: The account's owner/delegate.

func NewBurnCheckedInstructionBuilder

func NewBurnCheckedInstructionBuilder() *BurnChecked

NewBurnCheckedInstructionBuilder creates a new `BurnChecked` instruction builder.

func (*BurnChecked) Build

func (obj *BurnChecked) Build() *Instruction

func (*BurnChecked) EncodeToTree

func (obj *BurnChecked) EncodeToTree(parent treeout.Branches)

func (*BurnChecked) GetAuthorityAccount

func (obj *BurnChecked) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The account's owner/delegate.

func (*BurnChecked) GetBurnFromAccount

func (obj *BurnChecked) GetBurnFromAccount() *common.AccountMeta

GetBurnFromAccount gets the "burnFrom" parameter. The account to burn from.

func (*BurnChecked) GetMintAccount

func (obj *BurnChecked) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The token mint.

func (*BurnChecked) MarshalWithEncoder

func (obj *BurnChecked) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*BurnChecked) SetAmount

func (obj *BurnChecked) SetAmount(amount uint64) *BurnChecked

SetAmount sets the "amount" parameter.

func (*BurnChecked) SetAuthorityAccount

func (obj *BurnChecked) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *BurnChecked

SetAuthorityAccount sets the "authority" parameter. The account's owner/delegate.

func (*BurnChecked) SetBurnFromAccount

func (obj *BurnChecked) SetBurnFromAccount(burnFrom common.PublicKey) *BurnChecked

SetBurnFromAccount sets the "burnFrom" parameter. The account to burn from.

func (*BurnChecked) SetDecimals

func (obj *BurnChecked) SetDecimals(decimals uint64) *BurnChecked

SetDecimals sets the "decimals" parameter.

func (*BurnChecked) SetMintAccount

func (obj *BurnChecked) SetMintAccount(mint common.PublicKey) *BurnChecked

SetMintAccount sets the "mint" parameter. The token mint.

func (*BurnChecked) SetProgramId

func (obj *BurnChecked) SetProgramId(programId *common.PublicKey) *BurnChecked

func (*BurnChecked) UnmarshalWithDecoder

func (obj *BurnChecked) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*BurnChecked) Validate

func (obj *BurnChecked) Validate() error

func (*BurnChecked) ValidateAndBuild

func (obj *BurnChecked) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CiphertextArithmeticFailedError

type CiphertextArithmeticFailedError struct{}

CiphertextArithmeticFailedError Error: 60 `Ciphertext arithmetic failed`

func (CiphertextArithmeticFailedError) Code

func (CiphertextArithmeticFailedError) Error

type CloseAccount

type CloseAccount struct {
	// [0] = [WRITE] account `The account to close.`
	// [1] = [WRITE] destination `The destination account.`
	// [2] = [SIGNER] authority `The account's owner.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

CloseAccount Instruction

func NewCloseAccountInstruction

func NewCloseAccountInstruction(
	account common.PublicKey,
	destination common.PublicKey,
	authority common.PublicKey,
) *CloseAccount

NewCloseAccountInstruction

Parameters:

account: The account to close.
destination: The destination account.
authority: The account's owner.

func NewCloseAccountInstructionBuilder

func NewCloseAccountInstructionBuilder() *CloseAccount

NewCloseAccountInstructionBuilder creates a new `CloseAccount` instruction builder.

func (*CloseAccount) Build

func (obj *CloseAccount) Build() *Instruction

func (*CloseAccount) EncodeToTree

func (obj *CloseAccount) EncodeToTree(parent treeout.Branches)

func (*CloseAccount) GetAccountAccount

func (obj *CloseAccount) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to close.

func (*CloseAccount) GetAuthorityAccount

func (obj *CloseAccount) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The account's owner.

func (*CloseAccount) GetDestinationAccount

func (obj *CloseAccount) GetDestinationAccount() *common.AccountMeta

GetDestinationAccount gets the "destination" parameter. The destination account.

func (*CloseAccount) MarshalWithEncoder

func (obj *CloseAccount) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*CloseAccount) SetAccountAccount

func (obj *CloseAccount) SetAccountAccount(account common.PublicKey) *CloseAccount

SetAccountAccount sets the "account" parameter. The account to close.

func (*CloseAccount) SetAuthorityAccount

func (obj *CloseAccount) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *CloseAccount

SetAuthorityAccount sets the "authority" parameter. The account's owner.

func (*CloseAccount) SetDestinationAccount

func (obj *CloseAccount) SetDestinationAccount(destination common.PublicKey) *CloseAccount

SetDestinationAccount sets the "destination" parameter. The destination account.

func (*CloseAccount) SetProgramId

func (obj *CloseAccount) SetProgramId(programId *common.PublicKey) *CloseAccount

func (*CloseAccount) UnmarshalWithDecoder

func (obj *CloseAccount) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*CloseAccount) Validate

func (obj *CloseAccount) Validate() error

func (*CloseAccount) ValidateAndBuild

func (obj *CloseAccount) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type ConfidentialTransferAccountHasBalanceError

type ConfidentialTransferAccountHasBalanceError struct{}

ConfidentialTransferAccountHasBalanceError Error: 23 `An account can only be closed if its confidential balance is zero`

func (ConfidentialTransferAccountHasBalanceError) Code

func (ConfidentialTransferAccountHasBalanceError) Error

type ConfidentialTransferAccountNotApprovedError

type ConfidentialTransferAccountNotApprovedError struct{}

ConfidentialTransferAccountNotApprovedError Error: 24 `Account not approved for confidential transfers`

func (ConfidentialTransferAccountNotApprovedError) Code

func (ConfidentialTransferAccountNotApprovedError) Error

type ConfidentialTransferBalanceMismatchError

type ConfidentialTransferBalanceMismatchError struct{}

ConfidentialTransferBalanceMismatchError Error: 27 `Balance mismatch`

func (ConfidentialTransferBalanceMismatchError) Code

func (ConfidentialTransferBalanceMismatchError) Error

type ConfidentialTransferDepositsAndTransfersDisabledError

type ConfidentialTransferDepositsAndTransfersDisabledError struct{}

ConfidentialTransferDepositsAndTransfersDisabledError Error: 25 `Account not accepting deposits or transfers`

func (ConfidentialTransferDepositsAndTransfersDisabledError) Code

func (ConfidentialTransferDepositsAndTransfersDisabledError) Error

type ConfidentialTransferElGamalPubkeyMismatchError

type ConfidentialTransferElGamalPubkeyMismatchError struct{}

ConfidentialTransferElGamalPubkeyMismatchError Error: 26 `ElGamal public key mismatch`

func (ConfidentialTransferElGamalPubkeyMismatchError) Code

func (ConfidentialTransferElGamalPubkeyMismatchError) Error

type ConfidentialTransferExtension

type ConfidentialTransferExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

ConfidentialTransferExtension Instruction

func NewConfidentialTransferExtensionInstruction

func NewConfidentialTransferExtensionInstruction(
	data []byte,
) *ConfidentialTransferExtension

NewConfidentialTransferExtensionInstruction

Parameters:

data:

func NewConfidentialTransferExtensionInstructionBuilder

func NewConfidentialTransferExtensionInstructionBuilder() *ConfidentialTransferExtension

NewConfidentialTransferExtensionInstructionBuilder creates a new `ConfidentialTransferExtension` instruction builder.

func (*ConfidentialTransferExtension) Build

func (*ConfidentialTransferExtension) EncodeToTree

func (obj *ConfidentialTransferExtension) EncodeToTree(parent treeout.Branches)

func (*ConfidentialTransferExtension) MarshalWithEncoder

func (obj *ConfidentialTransferExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*ConfidentialTransferExtension) SetData

SetData sets the "data" parameter.

func (*ConfidentialTransferExtension) SetProgramId

func (*ConfidentialTransferExtension) UnmarshalWithDecoder

func (obj *ConfidentialTransferExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*ConfidentialTransferExtension) Validate

func (obj *ConfidentialTransferExtension) Validate() error

func (*ConfidentialTransferExtension) ValidateAndBuild

func (obj *ConfidentialTransferExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type ConfidentialTransferFeeAccountHasWithheldFeeError

type ConfidentialTransferFeeAccountHasWithheldFeeError struct{}

ConfidentialTransferFeeAccountHasWithheldFeeError Error: 50 `An account can only be closed if the confidential withheld fee is zero`

func (ConfidentialTransferFeeAccountHasWithheldFeeError) Code

func (ConfidentialTransferFeeAccountHasWithheldFeeError) Error

type ConfidentialTransferFeeExtension

type ConfidentialTransferFeeExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

ConfidentialTransferFeeExtension Instruction

func NewConfidentialTransferFeeExtensionInstruction

func NewConfidentialTransferFeeExtensionInstruction(
	data []byte,
) *ConfidentialTransferFeeExtension

NewConfidentialTransferFeeExtensionInstruction

Parameters:

data:

func NewConfidentialTransferFeeExtensionInstructionBuilder

func NewConfidentialTransferFeeExtensionInstructionBuilder() *ConfidentialTransferFeeExtension

NewConfidentialTransferFeeExtensionInstructionBuilder creates a new `ConfidentialTransferFeeExtension` instruction builder.

func (*ConfidentialTransferFeeExtension) Build

func (*ConfidentialTransferFeeExtension) EncodeToTree

func (obj *ConfidentialTransferFeeExtension) EncodeToTree(parent treeout.Branches)

func (*ConfidentialTransferFeeExtension) MarshalWithEncoder

func (obj *ConfidentialTransferFeeExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*ConfidentialTransferFeeExtension) SetData

SetData sets the "data" parameter.

func (*ConfidentialTransferFeeExtension) SetProgramId

func (*ConfidentialTransferFeeExtension) UnmarshalWithDecoder

func (obj *ConfidentialTransferFeeExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*ConfidentialTransferFeeExtension) Validate

func (obj *ConfidentialTransferFeeExtension) Validate() error

func (*ConfidentialTransferFeeExtension) ValidateAndBuild

func (obj *ConfidentialTransferFeeExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CpiGuardApproveBlockedError

type CpiGuardApproveBlockedError struct{}

CpiGuardApproveBlockedError Error: 45 `CPI Guard is enabled, and a program attempted to approve a delegate via CPI`

func (CpiGuardApproveBlockedError) Code

func (CpiGuardApproveBlockedError) Error

type CpiGuardBurnBlockedError

type CpiGuardBurnBlockedError struct{}

CpiGuardBurnBlockedError Error: 43 `CPI Guard is enabled, and a program attempted to burn user funds via CPI without using a delegate`

func (CpiGuardBurnBlockedError) Code

func (e CpiGuardBurnBlockedError) Code() int

func (CpiGuardBurnBlockedError) Error

func (e CpiGuardBurnBlockedError) Error() string

type CpiGuardCloseAccountBlockedError

type CpiGuardCloseAccountBlockedError struct{}

CpiGuardCloseAccountBlockedError Error: 44 `CPI Guard is enabled, and a program attempted to close an account via CPI without returning lamports to owner`

func (CpiGuardCloseAccountBlockedError) Code

func (CpiGuardCloseAccountBlockedError) Error

type CpiGuardExtension

type CpiGuardExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

CpiGuardExtension Instruction

func NewCpiGuardExtensionInstruction

func NewCpiGuardExtensionInstruction(
	data []byte,
) *CpiGuardExtension

NewCpiGuardExtensionInstruction

Parameters:

data:

func NewCpiGuardExtensionInstructionBuilder

func NewCpiGuardExtensionInstructionBuilder() *CpiGuardExtension

NewCpiGuardExtensionInstructionBuilder creates a new `CpiGuardExtension` instruction builder.

func (*CpiGuardExtension) Build

func (obj *CpiGuardExtension) Build() *Instruction

func (*CpiGuardExtension) EncodeToTree

func (obj *CpiGuardExtension) EncodeToTree(parent treeout.Branches)

func (*CpiGuardExtension) MarshalWithEncoder

func (obj *CpiGuardExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*CpiGuardExtension) SetData

func (obj *CpiGuardExtension) SetData(data []byte) *CpiGuardExtension

SetData sets the "data" parameter.

func (*CpiGuardExtension) SetProgramId

func (obj *CpiGuardExtension) SetProgramId(programId *common.PublicKey) *CpiGuardExtension

func (*CpiGuardExtension) UnmarshalWithDecoder

func (obj *CpiGuardExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*CpiGuardExtension) Validate

func (obj *CpiGuardExtension) Validate() error

func (*CpiGuardExtension) ValidateAndBuild

func (obj *CpiGuardExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CpiGuardOwnerChangeBlockedError

type CpiGuardOwnerChangeBlockedError struct{}

CpiGuardOwnerChangeBlockedError Error: 47 `Account ownership cannot be changed while CPI Guard is enabled`

func (CpiGuardOwnerChangeBlockedError) Code

func (CpiGuardOwnerChangeBlockedError) Error

type CpiGuardSetAuthorityBlockedError

type CpiGuardSetAuthorityBlockedError struct{}

CpiGuardSetAuthorityBlockedError Error: 46 `CPI Guard is enabled, and a program attempted to add or replace an authority via CPI`

func (CpiGuardSetAuthorityBlockedError) Code

func (CpiGuardSetAuthorityBlockedError) Error

type CpiGuardSettingsLockedError

type CpiGuardSettingsLockedError struct{}

CpiGuardSettingsLockedError Error: 41 `CPI Guard cannot be enabled or disabled in CPI`

func (CpiGuardSettingsLockedError) Code

func (CpiGuardSettingsLockedError) Error

type CpiGuardTransferBlockedError

type CpiGuardTransferBlockedError struct{}

CpiGuardTransferBlockedError Error: 42 `CPI Guard is enabled, and a program attempted to transfer user funds via CPI without using a delegate`

func (CpiGuardTransferBlockedError) Code

func (CpiGuardTransferBlockedError) Error

type CreateNativeMint

type CreateNativeMint struct {
	// [0] = [WRITE, SIGNER] funding “
	// [1] = [WRITE] nativeMint “
	// [2] = [] system “
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

CreateNativeMint Instruction

func NewCreateNativeMintInstruction

func NewCreateNativeMintInstruction(
	funding common.PublicKey,
	nativeMint common.PublicKey,
	system common.PublicKey,
) *CreateNativeMint

NewCreateNativeMintInstruction

Parameters:

funding:
nativeMint:
system:

func NewCreateNativeMintInstructionBuilder

func NewCreateNativeMintInstructionBuilder() *CreateNativeMint

NewCreateNativeMintInstructionBuilder creates a new `CreateNativeMint` instruction builder.

func (*CreateNativeMint) Build

func (obj *CreateNativeMint) Build() *Instruction

func (*CreateNativeMint) EncodeToTree

func (obj *CreateNativeMint) EncodeToTree(parent treeout.Branches)

func (*CreateNativeMint) GetFundingAccount

func (obj *CreateNativeMint) GetFundingAccount() *common.AccountMeta

GetFundingAccount gets the "funding" parameter.

func (*CreateNativeMint) GetNativeMintAccount

func (obj *CreateNativeMint) GetNativeMintAccount() *common.AccountMeta

GetNativeMintAccount gets the "nativeMint" parameter.

func (*CreateNativeMint) GetSystemAccount

func (obj *CreateNativeMint) GetSystemAccount() *common.AccountMeta

GetSystemAccount gets the "system" parameter.

func (*CreateNativeMint) MarshalWithEncoder

func (obj *CreateNativeMint) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*CreateNativeMint) SetFundingAccount

func (obj *CreateNativeMint) SetFundingAccount(funding common.PublicKey) *CreateNativeMint

SetFundingAccount sets the "funding" parameter.

func (*CreateNativeMint) SetNativeMintAccount

func (obj *CreateNativeMint) SetNativeMintAccount(nativeMint common.PublicKey) *CreateNativeMint

SetNativeMintAccount sets the "nativeMint" parameter.

func (*CreateNativeMint) SetProgramId

func (obj *CreateNativeMint) SetProgramId(programId *common.PublicKey) *CreateNativeMint

func (*CreateNativeMint) SetSystemAccount

func (obj *CreateNativeMint) SetSystemAccount(system common.PublicKey, multiSigners ...common.PublicKey) *CreateNativeMint

SetSystemAccount sets the "system" parameter.

func (*CreateNativeMint) UnmarshalWithDecoder

func (obj *CreateNativeMint) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*CreateNativeMint) Validate

func (obj *CreateNativeMint) Validate() error

func (*CreateNativeMint) ValidateAndBuild

func (obj *CreateNativeMint) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type DefaultAccountStateExtension

type DefaultAccountStateExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

DefaultAccountStateExtension Instruction

func NewDefaultAccountStateExtensionInstruction

func NewDefaultAccountStateExtensionInstruction(
	data []byte,
) *DefaultAccountStateExtension

NewDefaultAccountStateExtensionInstruction

Parameters:

data:

func NewDefaultAccountStateExtensionInstructionBuilder

func NewDefaultAccountStateExtensionInstructionBuilder() *DefaultAccountStateExtension

NewDefaultAccountStateExtensionInstructionBuilder creates a new `DefaultAccountStateExtension` instruction builder.

func (*DefaultAccountStateExtension) Build

func (*DefaultAccountStateExtension) EncodeToTree

func (obj *DefaultAccountStateExtension) EncodeToTree(parent treeout.Branches)

func (*DefaultAccountStateExtension) MarshalWithEncoder

func (obj *DefaultAccountStateExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*DefaultAccountStateExtension) SetData

SetData sets the "data" parameter.

func (*DefaultAccountStateExtension) SetProgramId

func (*DefaultAccountStateExtension) UnmarshalWithDecoder

func (obj *DefaultAccountStateExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*DefaultAccountStateExtension) Validate

func (obj *DefaultAccountStateExtension) Validate() error

func (*DefaultAccountStateExtension) ValidateAndBuild

func (obj *DefaultAccountStateExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type ExtensionAlreadyInitializedError

type ExtensionAlreadyInitializedError struct{}

ExtensionAlreadyInitializedError Error: 22 `Extension already initialized on this account`

func (ExtensionAlreadyInitializedError) Code

func (ExtensionAlreadyInitializedError) Error

type ExtensionBaseMismatchError

type ExtensionBaseMismatchError struct{}

ExtensionBaseMismatchError Error: 21 `Extension does not match the base type provided`

func (ExtensionBaseMismatchError) Code

func (ExtensionBaseMismatchError) Error

type ExtensionNotFoundError

type ExtensionNotFoundError struct{}

ExtensionNotFoundError Error: 48 `Extension not found in account data`

func (ExtensionNotFoundError) Code

func (e ExtensionNotFoundError) Code() int

func (ExtensionNotFoundError) Error

func (e ExtensionNotFoundError) Error() string

type ExtensionType

type ExtensionType binary.BorshEnum

ExtensionType Enum

const (
	ExtensionTypeUninitialized ExtensionType = iota
	ExtensionTypeTransferFeeConfig
	ExtensionTypeTransferFeeAmount
	ExtensionTypeMintCloseAuthority
	ExtensionTypeConfidentialTransferMint
	ExtensionTypeConfidentialTransferAccount
	ExtensionTypeDefaultAccountState
	ExtensionTypeImmutableOwner
	ExtensionTypeMemoTransfer
	ExtensionTypeNonTransferable
	ExtensionTypeInterestBearingConfig
	ExtensionTypeCpiGuard
	ExtensionTypePermanentDelegate
	ExtensionTypeNonTransferableAccount
	ExtensionTypeTransferHook
	ExtensionTypeTransferHookAccount
	ExtensionTypeConfidentialTransferFeeConfig
	ExtensionTypeConfidentialTransferFeeAmount
	ExtensionTypeMetadataPointer
	ExtensionTypeTokenMetadata
	ExtensionTypeGroupPointer
	ExtensionTypeTokenGroup
	ExtensionTypeGroupMemberPointer
	ExtensionTypeTokenGroupMember
)

func (ExtensionType) String

func (value ExtensionType) String() string

type ExtensionTypeMismatchError

type ExtensionTypeMismatchError struct{}

ExtensionTypeMismatchError Error: 20 `Extension type does not match already existing extensions`

func (ExtensionTypeMismatchError) Code

func (ExtensionTypeMismatchError) Error

type FeeMismatchError

type FeeMismatchError struct{}

FeeMismatchError Error: 32 `Calculated fee does not match expected fee`

func (FeeMismatchError) Code

func (e FeeMismatchError) Code() int

func (FeeMismatchError) Error

func (e FeeMismatchError) Error() string

type FeeParametersMismatchError

type FeeParametersMismatchError struct{}

FeeParametersMismatchError Error: 33 `Fee parameters associated with zero-knowledge proofs do not match fee parameters in mint`

func (FeeParametersMismatchError) Code

func (FeeParametersMismatchError) Error

type FixedSupplyError

type FixedSupplyError struct{}

FixedSupplyError Error: 5 `Fixed supply`

func (FixedSupplyError) Code

func (e FixedSupplyError) Code() int

func (FixedSupplyError) Error

func (e FixedSupplyError) Error() string

type FreezeAccount

type FreezeAccount struct {
	// [0] = [WRITE] account `The account to freeze.`
	// [1] = [] mint `The token mint.`
	// [2] = [SIGNER] authority `The mint freeze authority.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

FreezeAccount Instruction

func NewFreezeAccountInstruction

func NewFreezeAccountInstruction(
	account common.PublicKey,
	mint common.PublicKey,
	authority common.PublicKey,
) *FreezeAccount

NewFreezeAccountInstruction

Parameters:

account: The account to freeze.
mint: The token mint.
authority: The mint freeze authority.

func NewFreezeAccountInstructionBuilder

func NewFreezeAccountInstructionBuilder() *FreezeAccount

NewFreezeAccountInstructionBuilder creates a new `FreezeAccount` instruction builder.

func (*FreezeAccount) Build

func (obj *FreezeAccount) Build() *Instruction

func (*FreezeAccount) EncodeToTree

func (obj *FreezeAccount) EncodeToTree(parent treeout.Branches)

func (*FreezeAccount) GetAccountAccount

func (obj *FreezeAccount) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to freeze.

func (*FreezeAccount) GetAuthorityAccount

func (obj *FreezeAccount) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The mint freeze authority.

func (*FreezeAccount) GetMintAccount

func (obj *FreezeAccount) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The token mint.

func (*FreezeAccount) MarshalWithEncoder

func (obj *FreezeAccount) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*FreezeAccount) SetAccountAccount

func (obj *FreezeAccount) SetAccountAccount(account common.PublicKey) *FreezeAccount

SetAccountAccount sets the "account" parameter. The account to freeze.

func (*FreezeAccount) SetAuthorityAccount

func (obj *FreezeAccount) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *FreezeAccount

SetAuthorityAccount sets the "authority" parameter. The mint freeze authority.

func (*FreezeAccount) SetMintAccount

func (obj *FreezeAccount) SetMintAccount(mint common.PublicKey) *FreezeAccount

SetMintAccount sets the "mint" parameter. The token mint.

func (*FreezeAccount) SetProgramId

func (obj *FreezeAccount) SetProgramId(programId *common.PublicKey) *FreezeAccount

func (*FreezeAccount) UnmarshalWithDecoder

func (obj *FreezeAccount) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*FreezeAccount) Validate

func (obj *FreezeAccount) Validate() error

func (*FreezeAccount) ValidateAndBuild

func (obj *FreezeAccount) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type GetAccountDataSize

type GetAccountDataSize struct {
	ExtensionTypes []ExtensionType
	// [0] = [] mint `The mint to calculate for`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

GetAccountDataSize Instruction

func NewGetAccountDataSizeInstruction

func NewGetAccountDataSizeInstruction(
	extensionTypes []ExtensionType,
	mint common.PublicKey,
) *GetAccountDataSize

NewGetAccountDataSizeInstruction

Parameters:

extensionTypes:
mint: The mint to calculate for

func NewGetAccountDataSizeInstructionBuilder

func NewGetAccountDataSizeInstructionBuilder() *GetAccountDataSize

NewGetAccountDataSizeInstructionBuilder creates a new `GetAccountDataSize` instruction builder.

func (*GetAccountDataSize) Build

func (obj *GetAccountDataSize) Build() *Instruction

func (*GetAccountDataSize) EncodeToTree

func (obj *GetAccountDataSize) EncodeToTree(parent treeout.Branches)

func (*GetAccountDataSize) GetMintAccount

func (obj *GetAccountDataSize) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to calculate for

func (*GetAccountDataSize) MarshalWithEncoder

func (obj *GetAccountDataSize) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*GetAccountDataSize) SetExtensionTypes

func (obj *GetAccountDataSize) SetExtensionTypes(extensionTypes []ExtensionType) *GetAccountDataSize

SetExtensionTypes sets the "extensionTypes" parameter.

func (*GetAccountDataSize) SetMintAccount

func (obj *GetAccountDataSize) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *GetAccountDataSize

SetMintAccount sets the "mint" parameter. The mint to calculate for

func (*GetAccountDataSize) SetProgramId

func (obj *GetAccountDataSize) SetProgramId(programId *common.PublicKey) *GetAccountDataSize

func (*GetAccountDataSize) UnmarshalWithDecoder

func (obj *GetAccountDataSize) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*GetAccountDataSize) Validate

func (obj *GetAccountDataSize) Validate() error

func (*GetAccountDataSize) ValidateAndBuild

func (obj *GetAccountDataSize) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type GroupMemberPointerExtension

type GroupMemberPointerExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

GroupMemberPointerExtension Instruction

func NewGroupMemberPointerExtensionInstruction

func NewGroupMemberPointerExtensionInstruction(
	data []byte,
) *GroupMemberPointerExtension

NewGroupMemberPointerExtensionInstruction

Parameters:

data:

func NewGroupMemberPointerExtensionInstructionBuilder

func NewGroupMemberPointerExtensionInstructionBuilder() *GroupMemberPointerExtension

NewGroupMemberPointerExtensionInstructionBuilder creates a new `GroupMemberPointerExtension` instruction builder.

func (*GroupMemberPointerExtension) Build

func (*GroupMemberPointerExtension) EncodeToTree

func (obj *GroupMemberPointerExtension) EncodeToTree(parent treeout.Branches)

func (*GroupMemberPointerExtension) MarshalWithEncoder

func (obj *GroupMemberPointerExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*GroupMemberPointerExtension) SetData

SetData sets the "data" parameter.

func (*GroupMemberPointerExtension) SetProgramId

func (*GroupMemberPointerExtension) UnmarshalWithDecoder

func (obj *GroupMemberPointerExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*GroupMemberPointerExtension) Validate

func (obj *GroupMemberPointerExtension) Validate() error

func (*GroupMemberPointerExtension) ValidateAndBuild

func (obj *GroupMemberPointerExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type GroupPointerExtension

type GroupPointerExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

GroupPointerExtension Instruction

func NewGroupPointerExtensionInstruction

func NewGroupPointerExtensionInstruction(
	data []byte,
) *GroupPointerExtension

NewGroupPointerExtensionInstruction

Parameters:

data:

func NewGroupPointerExtensionInstructionBuilder

func NewGroupPointerExtensionInstructionBuilder() *GroupPointerExtension

NewGroupPointerExtensionInstructionBuilder creates a new `GroupPointerExtension` instruction builder.

func (*GroupPointerExtension) Build

func (obj *GroupPointerExtension) Build() *Instruction

func (*GroupPointerExtension) EncodeToTree

func (obj *GroupPointerExtension) EncodeToTree(parent treeout.Branches)

func (*GroupPointerExtension) MarshalWithEncoder

func (obj *GroupPointerExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*GroupPointerExtension) SetData

func (obj *GroupPointerExtension) SetData(data []byte) *GroupPointerExtension

SetData sets the "data" parameter.

func (*GroupPointerExtension) SetProgramId

func (obj *GroupPointerExtension) SetProgramId(programId *common.PublicKey) *GroupPointerExtension

func (*GroupPointerExtension) UnmarshalWithDecoder

func (obj *GroupPointerExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*GroupPointerExtension) Validate

func (obj *GroupPointerExtension) Validate() error

func (*GroupPointerExtension) ValidateAndBuild

func (obj *GroupPointerExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type HarvestToMintDisabledError

type HarvestToMintDisabledError struct{}

HarvestToMintDisabledError Error: 56 `Harvest of withheld tokens to mint is disabled`

func (HarvestToMintDisabledError) Code

func (HarvestToMintDisabledError) Error

type ImmutableOwnerError

type ImmutableOwnerError struct{}

ImmutableOwnerError Error: 34 `The owner authority cannot be changed`

func (ImmutableOwnerError) Code

func (e ImmutableOwnerError) Code() int

func (ImmutableOwnerError) Error

func (e ImmutableOwnerError) Error() string

type InitializeAccount

type InitializeAccount struct {
	// [0] = [WRITE] account `The account to initialize.`
	// [1] = [] mint `The mint this account will be associated with.`
	// [2] = [] authority `The new account's owner/multisignature.`
	// [3] = [] rent `Rent sysvar`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeAccount Instruction

func NewInitializeAccountInstruction

func NewInitializeAccountInstruction(
	account common.PublicKey,
	mint common.PublicKey,
	authority common.PublicKey,
	rent common.PublicKey,
) *InitializeAccount

NewInitializeAccountInstruction

Parameters:

account: The account to initialize.
mint: The mint this account will be associated with.
authority: The new account's owner/multisignature.
rent: Rent sysvar

func NewInitializeAccountInstructionBuilder

func NewInitializeAccountInstructionBuilder() *InitializeAccount

NewInitializeAccountInstructionBuilder creates a new `InitializeAccount` instruction builder.

func (*InitializeAccount) Build

func (obj *InitializeAccount) Build() *Instruction

func (*InitializeAccount) EncodeToTree

func (obj *InitializeAccount) EncodeToTree(parent treeout.Branches)

func (*InitializeAccount) GetAccountAccount

func (obj *InitializeAccount) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to initialize.

func (*InitializeAccount) GetAuthorityAccount

func (obj *InitializeAccount) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The new account's owner/multisignature.

func (*InitializeAccount) GetMintAccount

func (obj *InitializeAccount) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint this account will be associated with.

func (*InitializeAccount) GetRentAccount

func (obj *InitializeAccount) GetRentAccount() *common.AccountMeta

GetRentAccount gets the "rent" parameter. Rent sysvar

func (*InitializeAccount) MarshalWithEncoder

func (obj *InitializeAccount) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeAccount) SetAccountAccount

func (obj *InitializeAccount) SetAccountAccount(account common.PublicKey) *InitializeAccount

SetAccountAccount sets the "account" parameter. The account to initialize.

func (*InitializeAccount) SetAuthorityAccount

func (obj *InitializeAccount) SetAuthorityAccount(authority common.PublicKey) *InitializeAccount

SetAuthorityAccount sets the "authority" parameter. The new account's owner/multisignature.

func (*InitializeAccount) SetMintAccount

func (obj *InitializeAccount) SetMintAccount(mint common.PublicKey) *InitializeAccount

SetMintAccount sets the "mint" parameter. The mint this account will be associated with.

func (*InitializeAccount) SetProgramId

func (obj *InitializeAccount) SetProgramId(programId *common.PublicKey) *InitializeAccount

func (*InitializeAccount) SetRentAccount

func (obj *InitializeAccount) SetRentAccount(rent common.PublicKey, multiSigners ...common.PublicKey) *InitializeAccount

SetRentAccount sets the "rent" parameter. Rent sysvar

func (*InitializeAccount) UnmarshalWithDecoder

func (obj *InitializeAccount) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeAccount) Validate

func (obj *InitializeAccount) Validate() error

func (*InitializeAccount) ValidateAndBuild

func (obj *InitializeAccount) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeAccount2

type InitializeAccount2 struct {
	Owner *common.PublicKey
	// [0] = [WRITE] account `The account to initialize.`
	// [1] = [] mint `The mint this account will be associated with.`
	// [2] = [] rent `Rent sysvar`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeAccount2 Instruction

func NewInitializeAccount2Instruction

func NewInitializeAccount2Instruction(
	owner common.PublicKey,
	account common.PublicKey,
	mint common.PublicKey,
	rent common.PublicKey,
) *InitializeAccount2

NewInitializeAccount2Instruction

Parameters:

owner:
account: The account to initialize.
mint: The mint this account will be associated with.
rent: Rent sysvar

func NewInitializeAccount2InstructionBuilder

func NewInitializeAccount2InstructionBuilder() *InitializeAccount2

NewInitializeAccount2InstructionBuilder creates a new `InitializeAccount2` instruction builder.

func (*InitializeAccount2) Build

func (obj *InitializeAccount2) Build() *Instruction

func (*InitializeAccount2) EncodeToTree

func (obj *InitializeAccount2) EncodeToTree(parent treeout.Branches)

func (*InitializeAccount2) GetAccountAccount

func (obj *InitializeAccount2) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to initialize.

func (*InitializeAccount2) GetMintAccount

func (obj *InitializeAccount2) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint this account will be associated with.

func (*InitializeAccount2) GetRentAccount

func (obj *InitializeAccount2) GetRentAccount() *common.AccountMeta

GetRentAccount gets the "rent" parameter. Rent sysvar

func (*InitializeAccount2) MarshalWithEncoder

func (obj *InitializeAccount2) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeAccount2) SetAccountAccount

func (obj *InitializeAccount2) SetAccountAccount(account common.PublicKey) *InitializeAccount2

SetAccountAccount sets the "account" parameter. The account to initialize.

func (*InitializeAccount2) SetMintAccount

func (obj *InitializeAccount2) SetMintAccount(mint common.PublicKey) *InitializeAccount2

SetMintAccount sets the "mint" parameter. The mint this account will be associated with.

func (*InitializeAccount2) SetOwner

func (obj *InitializeAccount2) SetOwner(owner common.PublicKey) *InitializeAccount2

SetOwner sets the "owner" parameter.

func (*InitializeAccount2) SetProgramId

func (obj *InitializeAccount2) SetProgramId(programId *common.PublicKey) *InitializeAccount2

func (*InitializeAccount2) SetRentAccount

func (obj *InitializeAccount2) SetRentAccount(rent common.PublicKey, multiSigners ...common.PublicKey) *InitializeAccount2

SetRentAccount sets the "rent" parameter. Rent sysvar

func (*InitializeAccount2) UnmarshalWithDecoder

func (obj *InitializeAccount2) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeAccount2) Validate

func (obj *InitializeAccount2) Validate() error

func (*InitializeAccount2) ValidateAndBuild

func (obj *InitializeAccount2) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeAccount3

type InitializeAccount3 struct {
	Owner *common.PublicKey
	// [0] = [WRITE] account `The account to initialize.`
	// [1] = [] mint `The mint this account will be associated with.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeAccount3 Instruction

func NewInitializeAccount3Instruction

func NewInitializeAccount3Instruction(
	owner common.PublicKey,
	account common.PublicKey,
	mint common.PublicKey,
) *InitializeAccount3

NewInitializeAccount3Instruction

Parameters:

owner:
account: The account to initialize.
mint: The mint this account will be associated with.

func NewInitializeAccount3InstructionBuilder

func NewInitializeAccount3InstructionBuilder() *InitializeAccount3

NewInitializeAccount3InstructionBuilder creates a new `InitializeAccount3` instruction builder.

func (*InitializeAccount3) Build

func (obj *InitializeAccount3) Build() *Instruction

func (*InitializeAccount3) EncodeToTree

func (obj *InitializeAccount3) EncodeToTree(parent treeout.Branches)

func (*InitializeAccount3) GetAccountAccount

func (obj *InitializeAccount3) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to initialize.

func (*InitializeAccount3) GetMintAccount

func (obj *InitializeAccount3) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint this account will be associated with.

func (*InitializeAccount3) MarshalWithEncoder

func (obj *InitializeAccount3) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeAccount3) SetAccountAccount

func (obj *InitializeAccount3) SetAccountAccount(account common.PublicKey) *InitializeAccount3

SetAccountAccount sets the "account" parameter. The account to initialize.

func (*InitializeAccount3) SetMintAccount

func (obj *InitializeAccount3) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *InitializeAccount3

SetMintAccount sets the "mint" parameter. The mint this account will be associated with.

func (*InitializeAccount3) SetOwner

func (obj *InitializeAccount3) SetOwner(owner common.PublicKey) *InitializeAccount3

SetOwner sets the "owner" parameter.

func (*InitializeAccount3) SetProgramId

func (obj *InitializeAccount3) SetProgramId(programId *common.PublicKey) *InitializeAccount3

func (*InitializeAccount3) UnmarshalWithDecoder

func (obj *InitializeAccount3) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeAccount3) Validate

func (obj *InitializeAccount3) Validate() error

func (*InitializeAccount3) ValidateAndBuild

func (obj *InitializeAccount3) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeImmutableOwner

type InitializeImmutableOwner struct {
	// [0] = [WRITE] account `The account to initialize.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeImmutableOwner Instruction

func NewInitializeImmutableOwnerInstruction

func NewInitializeImmutableOwnerInstruction(
	account common.PublicKey,
) *InitializeImmutableOwner

NewInitializeImmutableOwnerInstruction

Parameters:

account: The account to initialize.

func NewInitializeImmutableOwnerInstructionBuilder

func NewInitializeImmutableOwnerInstructionBuilder() *InitializeImmutableOwner

NewInitializeImmutableOwnerInstructionBuilder creates a new `InitializeImmutableOwner` instruction builder.

func (*InitializeImmutableOwner) Build

func (obj *InitializeImmutableOwner) Build() *Instruction

func (*InitializeImmutableOwner) EncodeToTree

func (obj *InitializeImmutableOwner) EncodeToTree(parent treeout.Branches)

func (*InitializeImmutableOwner) GetAccountAccount

func (obj *InitializeImmutableOwner) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to initialize.

func (*InitializeImmutableOwner) MarshalWithEncoder

func (obj *InitializeImmutableOwner) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeImmutableOwner) SetAccountAccount

func (obj *InitializeImmutableOwner) SetAccountAccount(account common.PublicKey, multiSigners ...common.PublicKey) *InitializeImmutableOwner

SetAccountAccount sets the "account" parameter. The account to initialize.

func (*InitializeImmutableOwner) SetProgramId

func (obj *InitializeImmutableOwner) SetProgramId(programId *common.PublicKey) *InitializeImmutableOwner

func (*InitializeImmutableOwner) UnmarshalWithDecoder

func (obj *InitializeImmutableOwner) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeImmutableOwner) Validate

func (obj *InitializeImmutableOwner) Validate() error

func (*InitializeImmutableOwner) ValidateAndBuild

func (obj *InitializeImmutableOwner) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeMint

type InitializeMint struct {
	Decimals        *uint8
	Authority       *common.PublicKey
	FreezeAuthority *common.PublicKey `bin:"optional"`
	// [0] = [WRITE] mint `The mint to initialize.`
	// [1] = [] rent `Rent sysvar`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeMint Instruction

func NewInitializeMintInstruction

func NewInitializeMintInstruction(
	decimals uint8,
	authority common.PublicKey,

	freezeAuthority *common.PublicKey,
	mint common.PublicKey,
	rent common.PublicKey,
) *InitializeMint

NewInitializeMintInstruction

Parameters:

decimals:
authority:
freezeAuthority:
mint: The mint to initialize.
rent: Rent sysvar

func NewInitializeMintInstructionBuilder

func NewInitializeMintInstructionBuilder() *InitializeMint

NewInitializeMintInstructionBuilder creates a new `InitializeMint` instruction builder.

func (*InitializeMint) Build

func (obj *InitializeMint) Build() *Instruction

func (*InitializeMint) EncodeToTree

func (obj *InitializeMint) EncodeToTree(parent treeout.Branches)

func (*InitializeMint) GetMintAccount

func (obj *InitializeMint) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to initialize.

func (*InitializeMint) GetRentAccount

func (obj *InitializeMint) GetRentAccount() *common.AccountMeta

GetRentAccount gets the "rent" parameter. Rent sysvar

func (*InitializeMint) MarshalWithEncoder

func (obj *InitializeMint) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeMint) SetAuthority

func (obj *InitializeMint) SetAuthority(authority common.PublicKey) *InitializeMint

SetAuthority sets the "authority" parameter.

func (*InitializeMint) SetDecimals

func (obj *InitializeMint) SetDecimals(decimals uint8) *InitializeMint

SetDecimals sets the "decimals" parameter.

func (*InitializeMint) SetFreezeAuthority

func (obj *InitializeMint) SetFreezeAuthority(freezeAuthority *common.PublicKey) *InitializeMint

SetFreezeAuthority sets the "freezeAuthority" parameter.

func (*InitializeMint) SetMintAccount

func (obj *InitializeMint) SetMintAccount(mint common.PublicKey) *InitializeMint

SetMintAccount sets the "mint" parameter. The mint to initialize.

func (*InitializeMint) SetProgramId

func (obj *InitializeMint) SetProgramId(programId *common.PublicKey) *InitializeMint

func (*InitializeMint) SetRentAccount

func (obj *InitializeMint) SetRentAccount(rent common.PublicKey, multiSigners ...common.PublicKey) *InitializeMint

SetRentAccount sets the "rent" parameter. Rent sysvar

func (*InitializeMint) UnmarshalWithDecoder

func (obj *InitializeMint) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeMint) Validate

func (obj *InitializeMint) Validate() error

func (*InitializeMint) ValidateAndBuild

func (obj *InitializeMint) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeMint2

type InitializeMint2 struct {
	Decimals        *uint8
	Authority       *common.PublicKey
	FreezeAuthority *common.PublicKey `bin:"optional"`
	// [0] = [WRITE] mint `The mint to initialize.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeMint2 Instruction

func NewInitializeMint2Instruction

func NewInitializeMint2Instruction(
	decimals uint8,
	authority common.PublicKey,

	freezeAuthority *common.PublicKey,
	mint common.PublicKey,
) *InitializeMint2

NewInitializeMint2Instruction

Parameters:

decimals:
authority:
freezeAuthority:
mint: The mint to initialize.

func NewInitializeMint2InstructionBuilder

func NewInitializeMint2InstructionBuilder() *InitializeMint2

NewInitializeMint2InstructionBuilder creates a new `InitializeMint2` instruction builder.

func (*InitializeMint2) Build

func (obj *InitializeMint2) Build() *Instruction

func (*InitializeMint2) EncodeToTree

func (obj *InitializeMint2) EncodeToTree(parent treeout.Branches)

func (*InitializeMint2) GetMintAccount

func (obj *InitializeMint2) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to initialize.

func (*InitializeMint2) MarshalWithEncoder

func (obj *InitializeMint2) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeMint2) SetAuthority

func (obj *InitializeMint2) SetAuthority(authority common.PublicKey) *InitializeMint2

SetAuthority sets the "authority" parameter.

func (*InitializeMint2) SetDecimals

func (obj *InitializeMint2) SetDecimals(decimals uint8) *InitializeMint2

SetDecimals sets the "decimals" parameter.

func (*InitializeMint2) SetFreezeAuthority

func (obj *InitializeMint2) SetFreezeAuthority(freezeAuthority *common.PublicKey) *InitializeMint2

SetFreezeAuthority sets the "freezeAuthority" parameter.

func (*InitializeMint2) SetMintAccount

func (obj *InitializeMint2) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *InitializeMint2

SetMintAccount sets the "mint" parameter. The mint to initialize.

func (*InitializeMint2) SetProgramId

func (obj *InitializeMint2) SetProgramId(programId *common.PublicKey) *InitializeMint2

func (*InitializeMint2) UnmarshalWithDecoder

func (obj *InitializeMint2) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeMint2) Validate

func (obj *InitializeMint2) Validate() error

func (*InitializeMint2) ValidateAndBuild

func (obj *InitializeMint2) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeMintCloseAuthority

type InitializeMintCloseAuthority struct {
	CloseAuthority *common.PublicKey `bin:"optional"`
	// [0] = [WRITE] mint `The mint to initialize.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeMintCloseAuthority Instruction

func NewInitializeMintCloseAuthorityInstruction

func NewInitializeMintCloseAuthorityInstruction(

	closeAuthority *common.PublicKey,
	mint common.PublicKey,
) *InitializeMintCloseAuthority

NewInitializeMintCloseAuthorityInstruction

Parameters:

closeAuthority:
mint: The mint to initialize.

func NewInitializeMintCloseAuthorityInstructionBuilder

func NewInitializeMintCloseAuthorityInstructionBuilder() *InitializeMintCloseAuthority

NewInitializeMintCloseAuthorityInstructionBuilder creates a new `InitializeMintCloseAuthority` instruction builder.

func (*InitializeMintCloseAuthority) Build

func (*InitializeMintCloseAuthority) EncodeToTree

func (obj *InitializeMintCloseAuthority) EncodeToTree(parent treeout.Branches)

func (*InitializeMintCloseAuthority) GetMintAccount

func (obj *InitializeMintCloseAuthority) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to initialize.

func (*InitializeMintCloseAuthority) MarshalWithEncoder

func (obj *InitializeMintCloseAuthority) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeMintCloseAuthority) SetCloseAuthority

func (obj *InitializeMintCloseAuthority) SetCloseAuthority(closeAuthority *common.PublicKey) *InitializeMintCloseAuthority

SetCloseAuthority sets the "closeAuthority" parameter.

func (*InitializeMintCloseAuthority) SetMintAccount

func (obj *InitializeMintCloseAuthority) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *InitializeMintCloseAuthority

SetMintAccount sets the "mint" parameter. The mint to initialize.

func (*InitializeMintCloseAuthority) SetProgramId

func (*InitializeMintCloseAuthority) UnmarshalWithDecoder

func (obj *InitializeMintCloseAuthority) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeMintCloseAuthority) Validate

func (obj *InitializeMintCloseAuthority) Validate() error

func (*InitializeMintCloseAuthority) ValidateAndBuild

func (obj *InitializeMintCloseAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeMultisig

type InitializeMultisig struct {
	M *uint8
	// [0] = [WRITE] account `The multisignature account to initialize.`
	// [1] = [] rent `Rent sysvar`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeMultisig Instruction

func NewInitializeMultisigInstruction

func NewInitializeMultisigInstruction(
	m uint8,
	account common.PublicKey,
	rent common.PublicKey,
) *InitializeMultisig

NewInitializeMultisigInstruction

Parameters:

m:
account: The multisignature account to initialize.
rent: Rent sysvar

func NewInitializeMultisigInstructionBuilder

func NewInitializeMultisigInstructionBuilder() *InitializeMultisig

NewInitializeMultisigInstructionBuilder creates a new `InitializeMultisig` instruction builder.

func (*InitializeMultisig) Build

func (obj *InitializeMultisig) Build() *Instruction

func (*InitializeMultisig) EncodeToTree

func (obj *InitializeMultisig) EncodeToTree(parent treeout.Branches)

func (*InitializeMultisig) GetAccountAccount

func (obj *InitializeMultisig) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The multisignature account to initialize.

func (*InitializeMultisig) GetRentAccount

func (obj *InitializeMultisig) GetRentAccount() *common.AccountMeta

GetRentAccount gets the "rent" parameter. Rent sysvar

func (*InitializeMultisig) MarshalWithEncoder

func (obj *InitializeMultisig) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeMultisig) SetAccountAccount

func (obj *InitializeMultisig) SetAccountAccount(account common.PublicKey) *InitializeMultisig

SetAccountAccount sets the "account" parameter. The multisignature account to initialize.

func (*InitializeMultisig) SetM

SetM sets the "m" parameter.

func (*InitializeMultisig) SetProgramId

func (obj *InitializeMultisig) SetProgramId(programId *common.PublicKey) *InitializeMultisig

func (*InitializeMultisig) SetRentAccount

func (obj *InitializeMultisig) SetRentAccount(rent common.PublicKey, multiSigners ...common.PublicKey) *InitializeMultisig

SetRentAccount sets the "rent" parameter. Rent sysvar

func (*InitializeMultisig) UnmarshalWithDecoder

func (obj *InitializeMultisig) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeMultisig) Validate

func (obj *InitializeMultisig) Validate() error

func (*InitializeMultisig) ValidateAndBuild

func (obj *InitializeMultisig) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeMultisig2

type InitializeMultisig2 struct {
	M *uint8
	// [0] = [WRITE] account `The multisignature account to initialize.,..1+N. `[]` The signer accounts, must equal to N where 1 <= N <= 11.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeMultisig2 Instruction

func NewInitializeMultisig2Instruction

func NewInitializeMultisig2Instruction(
	m uint8,
	account common.PublicKey,
) *InitializeMultisig2

NewInitializeMultisig2Instruction

Parameters:

m:

account: The multisignature account to initialize.
..1+N. `[]` The signer accounts, must equal to N where 1 <= N <= 11.

func NewInitializeMultisig2InstructionBuilder

func NewInitializeMultisig2InstructionBuilder() *InitializeMultisig2

NewInitializeMultisig2InstructionBuilder creates a new `InitializeMultisig2` instruction builder.

func (*InitializeMultisig2) Build

func (obj *InitializeMultisig2) Build() *Instruction

func (*InitializeMultisig2) EncodeToTree

func (obj *InitializeMultisig2) EncodeToTree(parent treeout.Branches)

func (*InitializeMultisig2) GetAccountAccount

func (obj *InitializeMultisig2) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The multisignature account to initialize. ..1+N. `[]` The signer accounts, must equal to N where 1 <= N <= 11.

func (*InitializeMultisig2) MarshalWithEncoder

func (obj *InitializeMultisig2) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeMultisig2) SetAccountAccount

func (obj *InitializeMultisig2) SetAccountAccount(account common.PublicKey, multiSigners ...common.PublicKey) *InitializeMultisig2

SetAccountAccount sets the "account" parameter. The multisignature account to initialize. ..1+N. `[]` The signer accounts, must equal to N where 1 <= N <= 11.

func (*InitializeMultisig2) SetM

SetM sets the "m" parameter.

func (*InitializeMultisig2) SetProgramId

func (obj *InitializeMultisig2) SetProgramId(programId *common.PublicKey) *InitializeMultisig2

func (*InitializeMultisig2) UnmarshalWithDecoder

func (obj *InitializeMultisig2) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeMultisig2) Validate

func (obj *InitializeMultisig2) Validate() error

func (*InitializeMultisig2) ValidateAndBuild

func (obj *InitializeMultisig2) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeNonTransferableMint

type InitializeNonTransferableMint struct {
	// [0] = [WRITE] mint `The mint account to initialize.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializeNonTransferableMint Instruction

func NewInitializeNonTransferableMintInstruction

func NewInitializeNonTransferableMintInstruction(
	mint common.PublicKey,
) *InitializeNonTransferableMint

NewInitializeNonTransferableMintInstruction

Parameters:

mint: The mint account to initialize.

func NewInitializeNonTransferableMintInstructionBuilder

func NewInitializeNonTransferableMintInstructionBuilder() *InitializeNonTransferableMint

NewInitializeNonTransferableMintInstructionBuilder creates a new `InitializeNonTransferableMint` instruction builder.

func (*InitializeNonTransferableMint) Build

func (*InitializeNonTransferableMint) EncodeToTree

func (obj *InitializeNonTransferableMint) EncodeToTree(parent treeout.Branches)

func (*InitializeNonTransferableMint) GetMintAccount

func (obj *InitializeNonTransferableMint) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint account to initialize.

func (*InitializeNonTransferableMint) MarshalWithEncoder

func (obj *InitializeNonTransferableMint) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializeNonTransferableMint) SetMintAccount

SetMintAccount sets the "mint" parameter. The mint account to initialize.

func (*InitializeNonTransferableMint) SetProgramId

func (*InitializeNonTransferableMint) UnmarshalWithDecoder

func (obj *InitializeNonTransferableMint) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializeNonTransferableMint) Validate

func (obj *InitializeNonTransferableMint) Validate() error

func (*InitializeNonTransferableMint) ValidateAndBuild

func (obj *InitializeNonTransferableMint) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializePermanentDelegate

type InitializePermanentDelegate struct {
	Delegate *common.PublicKey
	// [0] = [WRITE] mint `The mint to initialize.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InitializePermanentDelegate Instruction

func NewInitializePermanentDelegateInstruction

func NewInitializePermanentDelegateInstruction(
	delegate common.PublicKey,
	mint common.PublicKey,
) *InitializePermanentDelegate

NewInitializePermanentDelegateInstruction

Parameters:

delegate:
mint: The mint to initialize.

func NewInitializePermanentDelegateInstructionBuilder

func NewInitializePermanentDelegateInstructionBuilder() *InitializePermanentDelegate

NewInitializePermanentDelegateInstructionBuilder creates a new `InitializePermanentDelegate` instruction builder.

func (*InitializePermanentDelegate) Build

func (*InitializePermanentDelegate) EncodeToTree

func (obj *InitializePermanentDelegate) EncodeToTree(parent treeout.Branches)

func (*InitializePermanentDelegate) GetMintAccount

func (obj *InitializePermanentDelegate) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to initialize.

func (*InitializePermanentDelegate) MarshalWithEncoder

func (obj *InitializePermanentDelegate) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InitializePermanentDelegate) SetDelegate

SetDelegate sets the "delegate" parameter.

func (*InitializePermanentDelegate) SetMintAccount

func (obj *InitializePermanentDelegate) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *InitializePermanentDelegate

SetMintAccount sets the "mint" parameter. The mint to initialize.

func (*InitializePermanentDelegate) SetProgramId

func (*InitializePermanentDelegate) UnmarshalWithDecoder

func (obj *InitializePermanentDelegate) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InitializePermanentDelegate) Validate

func (obj *InitializePermanentDelegate) Validate() error

func (*InitializePermanentDelegate) ValidateAndBuild

func (obj *InitializePermanentDelegate) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Instruction

type Instruction struct {
	binary.BaseVariant
	// contains filtered or unexported fields
}

func DecodeInstruction

func DecodeInstruction(accounts []*common.AccountMeta, data []byte) (*Instruction, error)

func (*Instruction) Accounts

func (obj *Instruction) Accounts() (out []*common.AccountMeta)

func (*Instruction) Data

func (obj *Instruction) Data() ([]byte, error)

func (*Instruction) EncodeToTree

func (obj *Instruction) EncodeToTree(parent treeout.Branches)

func (*Instruction) MarshalWithEncoder

func (obj *Instruction) MarshalWithEncoder(encoder *binary.Encoder) error

func (*Instruction) ProgramID

func (obj *Instruction) ProgramID() common.PublicKey

func (*Instruction) TextEncode

func (obj *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error

func (*Instruction) UnmarshalWithDecoder

func (obj *Instruction) UnmarshalWithDecoder(decoder *binary.Decoder) error

type InsufficientFundsError

type InsufficientFundsError struct{}

InsufficientFundsError Error: 1 `Insufficient funds`

func (InsufficientFundsError) Code

func (e InsufficientFundsError) Code() int

func (InsufficientFundsError) Error

func (e InsufficientFundsError) Error() string

type InterestBearingMintExtension

type InterestBearingMintExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

InterestBearingMintExtension Instruction

func NewInterestBearingMintExtensionInstruction

func NewInterestBearingMintExtensionInstruction(
	data []byte,
) *InterestBearingMintExtension

NewInterestBearingMintExtensionInstruction

Parameters:

data:

func NewInterestBearingMintExtensionInstructionBuilder

func NewInterestBearingMintExtensionInstructionBuilder() *InterestBearingMintExtension

NewInterestBearingMintExtensionInstructionBuilder creates a new `InterestBearingMintExtension` instruction builder.

func (*InterestBearingMintExtension) Build

func (*InterestBearingMintExtension) EncodeToTree

func (obj *InterestBearingMintExtension) EncodeToTree(parent treeout.Branches)

func (*InterestBearingMintExtension) MarshalWithEncoder

func (obj *InterestBearingMintExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*InterestBearingMintExtension) SetData

SetData sets the "data" parameter.

func (*InterestBearingMintExtension) SetProgramId

func (*InterestBearingMintExtension) UnmarshalWithDecoder

func (obj *InterestBearingMintExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*InterestBearingMintExtension) Validate

func (obj *InterestBearingMintExtension) Validate() error

func (*InterestBearingMintExtension) ValidateAndBuild

func (obj *InterestBearingMintExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InvalidExtensionCombinationError

type InvalidExtensionCombinationError struct{}

InvalidExtensionCombinationError Error: 51 `A mint or an account is initialized to an invalid combination of extensions`

func (InvalidExtensionCombinationError) Code

func (InvalidExtensionCombinationError) Error

type InvalidInstructionError

type InvalidInstructionError struct{}

InvalidInstructionError Error: 12 `Invalid instruction`

func (InvalidInstructionError) Code

func (e InvalidInstructionError) Code() int

func (InvalidInstructionError) Error

func (e InvalidInstructionError) Error() string

type InvalidLengthForAllocError

type InvalidLengthForAllocError struct{}

InvalidLengthForAllocError Error: 52 `Extension allocation with overwrite must use the same length`

func (InvalidLengthForAllocError) Code

func (InvalidLengthForAllocError) Error

type InvalidMintError

type InvalidMintError struct{}

InvalidMintError Error: 2 `Invalid Mint`

func (InvalidMintError) Code

func (e InvalidMintError) Code() int

func (InvalidMintError) Error

func (e InvalidMintError) Error() string

type InvalidNumberOfProvidedSignersError

type InvalidNumberOfProvidedSignersError struct{}

InvalidNumberOfProvidedSignersError Error: 7 `Invalid number of provided signers`

func (InvalidNumberOfProvidedSignersError) Code

func (InvalidNumberOfProvidedSignersError) Error

type InvalidNumberOfRequiredSignersError

type InvalidNumberOfRequiredSignersError struct{}

InvalidNumberOfRequiredSignersError Error: 8 `Invalid number of required signers`

func (InvalidNumberOfRequiredSignersError) Code

func (InvalidNumberOfRequiredSignersError) Error

type InvalidProofInstructionOffsetError

type InvalidProofInstructionOffsetError struct{}

InvalidProofInstructionOffsetError Error: 55 `An invalid proof instruction offset was provided`

func (InvalidProofInstructionOffsetError) Code

func (InvalidProofInstructionOffsetError) Error

type InvalidStateError

type InvalidStateError struct{}

InvalidStateError Error: 13 `State is invalid for requested operation`

func (InvalidStateError) Code

func (e InvalidStateError) Code() int

func (InvalidStateError) Error

func (e InvalidStateError) Error() string

type MalformedCiphertextError

type MalformedCiphertextError struct{}

MalformedCiphertextError Error: 59 `Ciphertext is malformed`

func (MalformedCiphertextError) Code

func (e MalformedCiphertextError) Code() int

func (MalformedCiphertextError) Error

func (e MalformedCiphertextError) Error() string

type MaximumDepositAmountExceededError

type MaximumDepositAmountExceededError struct{}

MaximumDepositAmountExceededError Error: 40 `Deposit amount exceeds maximum limit`

func (MaximumDepositAmountExceededError) Code

func (MaximumDepositAmountExceededError) Error

type MaximumPendingBalanceCreditCounterExceededError

type MaximumPendingBalanceCreditCounterExceededError struct{}

MaximumPendingBalanceCreditCounterExceededError Error: 39 `The total number of `Deposit` and `Transfer` instructions to an account cannot exceed

the associated `maximum_pending_balance_credit_counter``

func (MaximumPendingBalanceCreditCounterExceededError) Code

func (MaximumPendingBalanceCreditCounterExceededError) Error

type MemoTransferExtension

type MemoTransferExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

MemoTransferExtension Instruction

func NewMemoTransferExtensionInstruction

func NewMemoTransferExtensionInstruction(
	data []byte,
) *MemoTransferExtension

NewMemoTransferExtensionInstruction

Parameters:

data:

func NewMemoTransferExtensionInstructionBuilder

func NewMemoTransferExtensionInstructionBuilder() *MemoTransferExtension

NewMemoTransferExtensionInstructionBuilder creates a new `MemoTransferExtension` instruction builder.

func (*MemoTransferExtension) Build

func (obj *MemoTransferExtension) Build() *Instruction

func (*MemoTransferExtension) EncodeToTree

func (obj *MemoTransferExtension) EncodeToTree(parent treeout.Branches)

func (*MemoTransferExtension) MarshalWithEncoder

func (obj *MemoTransferExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*MemoTransferExtension) SetData

func (obj *MemoTransferExtension) SetData(data []byte) *MemoTransferExtension

SetData sets the "data" parameter.

func (*MemoTransferExtension) SetProgramId

func (obj *MemoTransferExtension) SetProgramId(programId *common.PublicKey) *MemoTransferExtension

func (*MemoTransferExtension) UnmarshalWithDecoder

func (obj *MemoTransferExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*MemoTransferExtension) Validate

func (obj *MemoTransferExtension) Validate() error

func (*MemoTransferExtension) ValidateAndBuild

func (obj *MemoTransferExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type MetadataPointerExtension

type MetadataPointerExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

MetadataPointerExtension Instruction

func NewMetadataPointerExtensionInstruction

func NewMetadataPointerExtensionInstruction(
	data []byte,
) *MetadataPointerExtension

NewMetadataPointerExtensionInstruction

Parameters:

data:

func NewMetadataPointerExtensionInstructionBuilder

func NewMetadataPointerExtensionInstructionBuilder() *MetadataPointerExtension

NewMetadataPointerExtensionInstructionBuilder creates a new `MetadataPointerExtension` instruction builder.

func (*MetadataPointerExtension) Build

func (obj *MetadataPointerExtension) Build() *Instruction

func (*MetadataPointerExtension) EncodeToTree

func (obj *MetadataPointerExtension) EncodeToTree(parent treeout.Branches)

func (*MetadataPointerExtension) MarshalWithEncoder

func (obj *MetadataPointerExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*MetadataPointerExtension) SetData

SetData sets the "data" parameter.

func (*MetadataPointerExtension) SetProgramId

func (obj *MetadataPointerExtension) SetProgramId(programId *common.PublicKey) *MetadataPointerExtension

func (*MetadataPointerExtension) UnmarshalWithDecoder

func (obj *MetadataPointerExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*MetadataPointerExtension) Validate

func (obj *MetadataPointerExtension) Validate() error

func (*MetadataPointerExtension) ValidateAndBuild

func (obj *MetadataPointerExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Mint

type Mint struct {
	// Optional authority used to mint new tokens. The mint authority may only
	// be provided during mint creation. If no mint authority is present
	// then the mint has a fixed supply and no further tokens may be
	// minted.
	MintAuthority *common.PublicKey `bin:"optional"`
	// Total supply of tokens.
	Supply uint64
	// Number of base 10 digits to the right of the decimal place.
	Decimals uint8
	// Is `true` if this structure has been initialized
	IsInitialized bool
	// Optional authority to freeze token accounts.
	FreezeAuthority *common.PublicKey `bin:"optional"`
}

Mint Struct Mint data.

func (*Mint) MarshalWithEncoder

func (obj *Mint) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Mint) UnmarshalWithDecoder

func (obj *Mint) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

type MintCannotFreezeError

type MintCannotFreezeError struct{}

MintCannotFreezeError Error: 16 `This token mint cannot freeze accounts`

func (MintCannotFreezeError) Code

func (e MintCannotFreezeError) Code() int

func (MintCannotFreezeError) Error

func (e MintCannotFreezeError) Error() string

type MintDecimalsMismatchError

type MintDecimalsMismatchError struct{}

MintDecimalsMismatchError Error: 18 `The provided decimals value different from the Mint decimals`

func (MintDecimalsMismatchError) Code

func (e MintDecimalsMismatchError) Code() int

func (MintDecimalsMismatchError) Error

type MintHasSupplyError

type MintHasSupplyError struct{}

MintHasSupplyError Error: 28 `Mint has non-zero supply. Burn all tokens before closing the mint`

func (MintHasSupplyError) Code

func (e MintHasSupplyError) Code() int

func (MintHasSupplyError) Error

func (e MintHasSupplyError) Error() string

type MintMismatchError

type MintMismatchError struct{}

MintMismatchError Error: 3 `Account not associated with this Mint`

func (MintMismatchError) Code

func (e MintMismatchError) Code() int

func (MintMismatchError) Error

func (e MintMismatchError) Error() string

type MintRequiredForTransferError

type MintRequiredForTransferError struct{}

MintRequiredForTransferError Error: 31 `Mint required for this account to transfer tokens, use `transfer_checked` or `transfer_checked_with_fee“

func (MintRequiredForTransferError) Code

func (MintRequiredForTransferError) Error

type MintTo

type MintTo struct {
	Amount *uint64
	// [0] = [WRITE] mint `The mint.`
	// [1] = [WRITE] to `The account to mint tokens to.`
	// [2] = [SIGNER] authority `The mint's minting authority.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

MintTo Instruction

func NewMintToInstruction

func NewMintToInstruction(
	amount uint64,
	mint common.PublicKey,
	to common.PublicKey,
	authority common.PublicKey,
) *MintTo

NewMintToInstruction

Parameters:

amount:
mint: The mint.
to: The account to mint tokens to.
authority: The mint's minting authority.

func NewMintToInstructionBuilder

func NewMintToInstructionBuilder() *MintTo

NewMintToInstructionBuilder creates a new `MintTo` instruction builder.

func (*MintTo) Build

func (obj *MintTo) Build() *Instruction

func (*MintTo) EncodeToTree

func (obj *MintTo) EncodeToTree(parent treeout.Branches)

func (*MintTo) GetAuthorityAccount

func (obj *MintTo) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The mint's minting authority.

func (*MintTo) GetMintAccount

func (obj *MintTo) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint.

func (*MintTo) GetToAccount

func (obj *MintTo) GetToAccount() *common.AccountMeta

GetToAccount gets the "to" parameter. The account to mint tokens to.

func (*MintTo) MarshalWithEncoder

func (obj *MintTo) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*MintTo) SetAmount

func (obj *MintTo) SetAmount(amount uint64) *MintTo

SetAmount sets the "amount" parameter.

func (*MintTo) SetAuthorityAccount

func (obj *MintTo) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *MintTo

SetAuthorityAccount sets the "authority" parameter. The mint's minting authority.

func (*MintTo) SetMintAccount

func (obj *MintTo) SetMintAccount(mint common.PublicKey) *MintTo

SetMintAccount sets the "mint" parameter. The mint.

func (*MintTo) SetProgramId

func (obj *MintTo) SetProgramId(programId *common.PublicKey) *MintTo

func (*MintTo) SetToAccount

func (obj *MintTo) SetToAccount(to common.PublicKey) *MintTo

SetToAccount sets the "to" parameter. The account to mint tokens to.

func (*MintTo) UnmarshalWithDecoder

func (obj *MintTo) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*MintTo) Validate

func (obj *MintTo) Validate() error

func (*MintTo) ValidateAndBuild

func (obj *MintTo) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type MintToChecked

type MintToChecked struct {
	Amount   *uint64
	Decimals *uint64
	// [0] = [WRITE] mint `The mint.`
	// [1] = [WRITE] to `The account to mint tokens to.`
	// [2] = [SIGNER] authority `The mint's minting authority.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

MintToChecked Instruction

func NewMintToCheckedInstruction

func NewMintToCheckedInstruction(
	amount uint64,
	decimals uint64,
	mint common.PublicKey,
	to common.PublicKey,
	authority common.PublicKey,
) *MintToChecked

NewMintToCheckedInstruction

Parameters:

amount:
decimals:
mint: The mint.
to: The account to mint tokens to.
authority: The mint's minting authority.

func NewMintToCheckedInstructionBuilder

func NewMintToCheckedInstructionBuilder() *MintToChecked

NewMintToCheckedInstructionBuilder creates a new `MintToChecked` instruction builder.

func (*MintToChecked) Build

func (obj *MintToChecked) Build() *Instruction

func (*MintToChecked) EncodeToTree

func (obj *MintToChecked) EncodeToTree(parent treeout.Branches)

func (*MintToChecked) GetAuthorityAccount

func (obj *MintToChecked) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The mint's minting authority.

func (*MintToChecked) GetMintAccount

func (obj *MintToChecked) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint.

func (*MintToChecked) GetToAccount

func (obj *MintToChecked) GetToAccount() *common.AccountMeta

GetToAccount gets the "to" parameter. The account to mint tokens to.

func (*MintToChecked) MarshalWithEncoder

func (obj *MintToChecked) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*MintToChecked) SetAmount

func (obj *MintToChecked) SetAmount(amount uint64) *MintToChecked

SetAmount sets the "amount" parameter.

func (*MintToChecked) SetAuthorityAccount

func (obj *MintToChecked) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *MintToChecked

SetAuthorityAccount sets the "authority" parameter. The mint's minting authority.

func (*MintToChecked) SetDecimals

func (obj *MintToChecked) SetDecimals(decimals uint64) *MintToChecked

SetDecimals sets the "decimals" parameter.

func (*MintToChecked) SetMintAccount

func (obj *MintToChecked) SetMintAccount(mint common.PublicKey) *MintToChecked

SetMintAccount sets the "mint" parameter. The mint.

func (*MintToChecked) SetProgramId

func (obj *MintToChecked) SetProgramId(programId *common.PublicKey) *MintToChecked

func (*MintToChecked) SetToAccount

func (obj *MintToChecked) SetToAccount(to common.PublicKey) *MintToChecked

SetToAccount sets the "to" parameter. The account to mint tokens to.

func (*MintToChecked) UnmarshalWithDecoder

func (obj *MintToChecked) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*MintToChecked) Validate

func (obj *MintToChecked) Validate() error

func (*MintToChecked) ValidateAndBuild

func (obj *MintToChecked) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Multisig

type Multisig struct {
	// Number of signers required
	M uint8
	// Number of valid signers
	N uint8
	// Is `true` if this structure has been initialized
	IsInitialized bool
	// Signer public keys
	Signers [11]common.PublicKey
}

Multisig Struct Multisignature data.

func (*Multisig) MarshalWithEncoder

func (obj *Multisig) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Multisig) UnmarshalWithDecoder

func (obj *Multisig) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

type NativeNotSupportedError

type NativeNotSupportedError struct{}

NativeNotSupportedError Error: 10 `Instruction does not support native tokens`

func (NativeNotSupportedError) Code

func (e NativeNotSupportedError) Code() int

func (NativeNotSupportedError) Error

func (e NativeNotSupportedError) Error() string

type NoAuthorityExistsError

type NoAuthorityExistsError struct{}

NoAuthorityExistsError Error: 29 `No authority exists to perform the desired operation`

func (NoAuthorityExistsError) Code

func (e NoAuthorityExistsError) Code() int

func (NoAuthorityExistsError) Error

func (e NoAuthorityExistsError) Error() string

type NoMemoError

type NoMemoError struct{}

NoMemoError Error: 36 `No memo in previous instruction; required for recipient to receive a transfer`

func (NoMemoError) Code

func (e NoMemoError) Code() int

func (NoMemoError) Error

func (e NoMemoError) Error() string

type NonConfidentialTransfersDisabledError

type NonConfidentialTransfersDisabledError struct{}

NonConfidentialTransfersDisabledError Error: 49 `Non-confidential transfers disabled`

func (NonConfidentialTransfersDisabledError) Code

func (NonConfidentialTransfersDisabledError) Error

type NonNativeHasBalanceError

type NonNativeHasBalanceError struct{}

NonNativeHasBalanceError Error: 11 `Non-native account can only be closed if its balance is zero`

func (NonNativeHasBalanceError) Code

func (e NonNativeHasBalanceError) Code() int

func (NonNativeHasBalanceError) Error

func (e NonNativeHasBalanceError) Error() string

type NonNativeNotSupportedError

type NonNativeNotSupportedError struct{}

NonNativeNotSupportedError Error: 19 `Instruction does not support non-native tokens`

func (NonNativeNotSupportedError) Code

func (NonNativeNotSupportedError) Error

type NonTransferableError

type NonTransferableError struct{}

NonTransferableError Error: 37 `Transfer is disabled for this mint`

func (NonTransferableError) Code

func (e NonTransferableError) Code() int

func (NonTransferableError) Error

func (e NonTransferableError) Error() string

type NonTransferableNeedsImmutableOwnershipError

type NonTransferableNeedsImmutableOwnershipError struct{}

NonTransferableNeedsImmutableOwnershipError Error: 38 `Non-transferable tokens can't be minted to an account without immutable ownership`

func (NonTransferableNeedsImmutableOwnershipError) Code

func (NonTransferableNeedsImmutableOwnershipError) Error

type NotEnoughProofContextStateAccountsError

type NotEnoughProofContextStateAccountsError struct{}

NotEnoughProofContextStateAccountsError Error: 58 `Not enough proof context state accounts provided`

func (NotEnoughProofContextStateAccountsError) Code

func (NotEnoughProofContextStateAccountsError) Error

type NotRentExemptError

type NotRentExemptError struct{}

NotRentExemptError Error: 0 `Lamport balance below rent-exempt threshold`

func (NotRentExemptError) Code

func (e NotRentExemptError) Code() int

func (NotRentExemptError) Error

func (e NotRentExemptError) Error() string

type OverflowError

type OverflowError struct{}

OverflowError Error: 14 `Operation overflowed`

func (OverflowError) Code

func (e OverflowError) Code() int

func (OverflowError) Error

func (e OverflowError) Error() string

type OwnerMismatchError

type OwnerMismatchError struct{}

OwnerMismatchError Error: 4 `Owner does not match`

func (OwnerMismatchError) Code

func (e OwnerMismatchError) Code() int

func (OwnerMismatchError) Error

func (e OwnerMismatchError) Error() string

type ProgramError

type ProgramError interface {
	Code() int
	Error() string
}

func GetSplToken2022ErrorFromCode

func GetSplToken2022ErrorFromCode(code int) ProgramError

func GetSplToken2022ErrorFromName

func GetSplToken2022ErrorFromName(name string) ProgramError

type ProofGenerationError

type ProofGenerationError struct{}

ProofGenerationError Error: 54 `Failed to generate proof`

func (ProofGenerationError) Code

func (e ProofGenerationError) Code() int

func (ProofGenerationError) Error

func (e ProofGenerationError) Error() string

type Reallocate

type Reallocate struct {
	// [0] = [WRITE] account `The account to reallocate.`
	// [1] = [WRITE, SIGNER] payer `The payer account to fund reallocation`
	// [2] = [] system `System program for reallocation funding`
	// [3] = [SIGNER] accountOwner `The account's owner.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Reallocate Instruction

func NewReallocateInstruction

func NewReallocateInstruction(
	account common.PublicKey,
	payer common.PublicKey,
	system common.PublicKey,
	accountOwner common.PublicKey,
) *Reallocate

NewReallocateInstruction

Parameters:

account: The account to reallocate.
payer: The payer account to fund reallocation
system: System program for reallocation funding
accountOwner: The account's owner.

func NewReallocateInstructionBuilder

func NewReallocateInstructionBuilder() *Reallocate

NewReallocateInstructionBuilder creates a new `Reallocate` instruction builder.

func (*Reallocate) Build

func (obj *Reallocate) Build() *Instruction

func (*Reallocate) EncodeToTree

func (obj *Reallocate) EncodeToTree(parent treeout.Branches)

func (*Reallocate) GetAccountAccount

func (obj *Reallocate) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to reallocate.

func (*Reallocate) GetAccountOwnerAccount

func (obj *Reallocate) GetAccountOwnerAccount() *common.AccountMeta

GetAccountOwnerAccount gets the "accountOwner" parameter. The account's owner.

func (*Reallocate) GetPayerAccount

func (obj *Reallocate) GetPayerAccount() *common.AccountMeta

GetPayerAccount gets the "payer" parameter. The payer account to fund reallocation

func (*Reallocate) GetSystemAccount

func (obj *Reallocate) GetSystemAccount() *common.AccountMeta

GetSystemAccount gets the "system" parameter. System program for reallocation funding

func (*Reallocate) MarshalWithEncoder

func (obj *Reallocate) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Reallocate) SetAccountAccount

func (obj *Reallocate) SetAccountAccount(account common.PublicKey) *Reallocate

SetAccountAccount sets the "account" parameter. The account to reallocate.

func (*Reallocate) SetAccountOwnerAccount

func (obj *Reallocate) SetAccountOwnerAccount(accountOwner common.PublicKey, multiSigners ...common.PublicKey) *Reallocate

SetAccountOwnerAccount sets the "accountOwner" parameter. The account's owner.

func (*Reallocate) SetPayerAccount

func (obj *Reallocate) SetPayerAccount(payer common.PublicKey) *Reallocate

SetPayerAccount sets the "payer" parameter. The payer account to fund reallocation

func (*Reallocate) SetProgramId

func (obj *Reallocate) SetProgramId(programId *common.PublicKey) *Reallocate

func (*Reallocate) SetSystemAccount

func (obj *Reallocate) SetSystemAccount(system common.PublicKey) *Reallocate

SetSystemAccount sets the "system" parameter. System program for reallocation funding

func (*Reallocate) UnmarshalWithDecoder

func (obj *Reallocate) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*Reallocate) Validate

func (obj *Reallocate) Validate() error

func (*Reallocate) ValidateAndBuild

func (obj *Reallocate) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Revoke

type Revoke struct {
	// [0] = [WRITE] source `The source account.`
	// [1] = [SIGNER] authority `The source account owner or current delegate.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Revoke Instruction

func NewRevokeInstruction

func NewRevokeInstruction(
	source common.PublicKey,
	authority common.PublicKey,
) *Revoke

NewRevokeInstruction

Parameters:

source: The source account.
authority: The source account owner or current delegate.

func NewRevokeInstructionBuilder

func NewRevokeInstructionBuilder() *Revoke

NewRevokeInstructionBuilder creates a new `Revoke` instruction builder.

func (*Revoke) Build

func (obj *Revoke) Build() *Instruction

func (*Revoke) EncodeToTree

func (obj *Revoke) EncodeToTree(parent treeout.Branches)

func (*Revoke) GetAuthorityAccount

func (obj *Revoke) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The source account owner or current delegate.

func (*Revoke) GetSourceAccount

func (obj *Revoke) GetSourceAccount() *common.AccountMeta

GetSourceAccount gets the "source" parameter. The source account.

func (*Revoke) MarshalWithEncoder

func (obj *Revoke) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Revoke) SetAuthorityAccount

func (obj *Revoke) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *Revoke

SetAuthorityAccount sets the "authority" parameter. The source account owner or current delegate.

func (*Revoke) SetProgramId

func (obj *Revoke) SetProgramId(programId *common.PublicKey) *Revoke

func (*Revoke) SetSourceAccount

func (obj *Revoke) SetSourceAccount(source common.PublicKey) *Revoke

SetSourceAccount sets the "source" parameter. The source account.

func (*Revoke) UnmarshalWithDecoder

func (obj *Revoke) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*Revoke) Validate

func (obj *Revoke) Validate() error

func (*Revoke) ValidateAndBuild

func (obj *Revoke) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetAuthority

type SetAuthority struct {
	AuthorityType *AuthorityType
	NewAuthority  *common.PublicKey `bin:"optional"`
	// [0] = [WRITE] currentAuthority `The mint or account to change the authority of.`
	// [1] = [SIGNER] accountOrMint `The current authority of the mint or account.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

SetAuthority Instruction

func NewSetAuthorityInstruction

func NewSetAuthorityInstruction(
	authorityType AuthorityType,

	newAuthority *common.PublicKey,
	currentAuthority common.PublicKey,
	accountOrMint common.PublicKey,
) *SetAuthority

NewSetAuthorityInstruction

Parameters:

authorityType:
newAuthority:
currentAuthority: The mint or account to change the authority of.
accountOrMint: The current authority of the mint or account.

func NewSetAuthorityInstructionBuilder

func NewSetAuthorityInstructionBuilder() *SetAuthority

NewSetAuthorityInstructionBuilder creates a new `SetAuthority` instruction builder.

func (*SetAuthority) Build

func (obj *SetAuthority) Build() *Instruction

func (*SetAuthority) EncodeToTree

func (obj *SetAuthority) EncodeToTree(parent treeout.Branches)

func (*SetAuthority) GetAccountOrMintAccount

func (obj *SetAuthority) GetAccountOrMintAccount() *common.AccountMeta

GetAccountOrMintAccount gets the "accountOrMint" parameter. The current authority of the mint or account.

func (*SetAuthority) GetCurrentAuthorityAccount

func (obj *SetAuthority) GetCurrentAuthorityAccount() *common.AccountMeta

GetCurrentAuthorityAccount gets the "currentAuthority" parameter. The mint or account to change the authority of.

func (*SetAuthority) MarshalWithEncoder

func (obj *SetAuthority) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*SetAuthority) SetAccountOrMintAccount

func (obj *SetAuthority) SetAccountOrMintAccount(accountOrMint common.PublicKey, multiSigners ...common.PublicKey) *SetAuthority

SetAccountOrMintAccount sets the "accountOrMint" parameter. The current authority of the mint or account.

func (*SetAuthority) SetAuthorityType

func (obj *SetAuthority) SetAuthorityType(authorityType AuthorityType) *SetAuthority

SetAuthorityType sets the "authorityType" parameter.

func (*SetAuthority) SetCurrentAuthorityAccount

func (obj *SetAuthority) SetCurrentAuthorityAccount(currentAuthority common.PublicKey) *SetAuthority

SetCurrentAuthorityAccount sets the "currentAuthority" parameter. The mint or account to change the authority of.

func (*SetAuthority) SetNewAuthority

func (obj *SetAuthority) SetNewAuthority(newAuthority *common.PublicKey) *SetAuthority

SetNewAuthority sets the "newAuthority" parameter.

func (*SetAuthority) SetProgramId

func (obj *SetAuthority) SetProgramId(programId *common.PublicKey) *SetAuthority

func (*SetAuthority) UnmarshalWithDecoder

func (obj *SetAuthority) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*SetAuthority) Validate

func (obj *SetAuthority) Validate() error

func (*SetAuthority) ValidateAndBuild

func (obj *SetAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SplitProofContextStateAccountsNotSupportedError

type SplitProofContextStateAccountsNotSupportedError struct{}

SplitProofContextStateAccountsNotSupportedError Error: 57 `Split proof context state accounts not supported for instruction`

func (SplitProofContextStateAccountsNotSupportedError) Code

func (SplitProofContextStateAccountsNotSupportedError) Error

type SyncNative

type SyncNative struct {
	// [0] = [WRITE] account `The native token account to sync with its underlying lamports.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

SyncNative Instruction

func NewSyncNativeInstruction

func NewSyncNativeInstruction(
	account common.PublicKey,
) *SyncNative

NewSyncNativeInstruction

Parameters:

account: The native token account to sync with its underlying lamports.

func NewSyncNativeInstructionBuilder

func NewSyncNativeInstructionBuilder() *SyncNative

NewSyncNativeInstructionBuilder creates a new `SyncNative` instruction builder.

func (*SyncNative) Build

func (obj *SyncNative) Build() *Instruction

func (*SyncNative) EncodeToTree

func (obj *SyncNative) EncodeToTree(parent treeout.Branches)

func (*SyncNative) GetAccountAccount

func (obj *SyncNative) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The native token account to sync with its underlying lamports.

func (*SyncNative) MarshalWithEncoder

func (obj *SyncNative) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*SyncNative) SetAccountAccount

func (obj *SyncNative) SetAccountAccount(account common.PublicKey, multiSigners ...common.PublicKey) *SyncNative

SetAccountAccount sets the "account" parameter. The native token account to sync with its underlying lamports.

func (*SyncNative) SetProgramId

func (obj *SyncNative) SetProgramId(programId *common.PublicKey) *SyncNative

func (*SyncNative) UnmarshalWithDecoder

func (obj *SyncNative) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*SyncNative) Validate

func (obj *SyncNative) Validate() error

func (*SyncNative) ValidateAndBuild

func (obj *SyncNative) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type ThawAccount

type ThawAccount struct {
	// [0] = [WRITE] account `The account to freeze.`
	// [1] = [] mint `The token mint.`
	// [2] = [SIGNER] authority `The mint freeze authority.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

ThawAccount Instruction

func NewThawAccountInstruction

func NewThawAccountInstruction(
	account common.PublicKey,
	mint common.PublicKey,
	authority common.PublicKey,
) *ThawAccount

NewThawAccountInstruction

Parameters:

account: The account to freeze.
mint: The token mint.
authority: The mint freeze authority.

func NewThawAccountInstructionBuilder

func NewThawAccountInstructionBuilder() *ThawAccount

NewThawAccountInstructionBuilder creates a new `ThawAccount` instruction builder.

func (*ThawAccount) Build

func (obj *ThawAccount) Build() *Instruction

func (*ThawAccount) EncodeToTree

func (obj *ThawAccount) EncodeToTree(parent treeout.Branches)

func (*ThawAccount) GetAccountAccount

func (obj *ThawAccount) GetAccountAccount() *common.AccountMeta

GetAccountAccount gets the "account" parameter. The account to freeze.

func (*ThawAccount) GetAuthorityAccount

func (obj *ThawAccount) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The mint freeze authority.

func (*ThawAccount) GetMintAccount

func (obj *ThawAccount) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The token mint.

func (*ThawAccount) MarshalWithEncoder

func (obj *ThawAccount) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*ThawAccount) SetAccountAccount

func (obj *ThawAccount) SetAccountAccount(account common.PublicKey) *ThawAccount

SetAccountAccount sets the "account" parameter. The account to freeze.

func (*ThawAccount) SetAuthorityAccount

func (obj *ThawAccount) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *ThawAccount

SetAuthorityAccount sets the "authority" parameter. The mint freeze authority.

func (*ThawAccount) SetMintAccount

func (obj *ThawAccount) SetMintAccount(mint common.PublicKey) *ThawAccount

SetMintAccount sets the "mint" parameter. The token mint.

func (*ThawAccount) SetProgramId

func (obj *ThawAccount) SetProgramId(programId *common.PublicKey) *ThawAccount

func (*ThawAccount) UnmarshalWithDecoder

func (obj *ThawAccount) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*ThawAccount) Validate

func (obj *ThawAccount) Validate() error

func (*ThawAccount) ValidateAndBuild

func (obj *ThawAccount) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type Transfer

type Transfer struct {
	Amount *uint64
	// [0] = [WRITE] source `The source account.`
	// [1] = [WRITE] destination `The destination account.`
	// [2] = [SIGNER] authority `The source account's owner/delegate.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Transfer Instruction

func NewTransferInstruction

func NewTransferInstruction(
	amount uint64,
	source common.PublicKey,
	destination common.PublicKey,
	authority common.PublicKey,
) *Transfer

NewTransferInstruction

Parameters:

amount:
source: The source account.
destination: The destination account.
authority: The source account's owner/delegate.

func NewTransferInstructionBuilder

func NewTransferInstructionBuilder() *Transfer

NewTransferInstructionBuilder creates a new `Transfer` instruction builder.

func (*Transfer) Build

func (obj *Transfer) Build() *Instruction

func (*Transfer) EncodeToTree

func (obj *Transfer) EncodeToTree(parent treeout.Branches)

func (*Transfer) GetAuthorityAccount

func (obj *Transfer) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The source account's owner/delegate.

func (*Transfer) GetDestinationAccount

func (obj *Transfer) GetDestinationAccount() *common.AccountMeta

GetDestinationAccount gets the "destination" parameter. The destination account.

func (*Transfer) GetSourceAccount

func (obj *Transfer) GetSourceAccount() *common.AccountMeta

GetSourceAccount gets the "source" parameter. The source account.

func (*Transfer) MarshalWithEncoder

func (obj *Transfer) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*Transfer) SetAmount

func (obj *Transfer) SetAmount(amount uint64) *Transfer

SetAmount sets the "amount" parameter.

func (*Transfer) SetAuthorityAccount

func (obj *Transfer) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *Transfer

SetAuthorityAccount sets the "authority" parameter. The source account's owner/delegate.

func (*Transfer) SetDestinationAccount

func (obj *Transfer) SetDestinationAccount(destination common.PublicKey) *Transfer

SetDestinationAccount sets the "destination" parameter. The destination account.

func (*Transfer) SetProgramId

func (obj *Transfer) SetProgramId(programId *common.PublicKey) *Transfer

func (*Transfer) SetSourceAccount

func (obj *Transfer) SetSourceAccount(source common.PublicKey) *Transfer

SetSourceAccount sets the "source" parameter. The source account.

func (*Transfer) UnmarshalWithDecoder

func (obj *Transfer) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*Transfer) Validate

func (obj *Transfer) Validate() error

func (*Transfer) ValidateAndBuild

func (obj *Transfer) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type TransferChecked

type TransferChecked struct {
	Amount   *uint64
	Decimals *uint8
	// [0] = [WRITE] source `The source account.`
	// [1] = [] mint `The token mint.`
	// [2] = [WRITE] destination `The destination account.`
	// [3] = [SIGNER] authority `The source account's owner/delegate.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

TransferChecked Instruction

func NewTransferCheckedInstruction

func NewTransferCheckedInstruction(
	amount uint64,
	decimals uint8,
	source common.PublicKey,
	mint common.PublicKey,
	destination common.PublicKey,
	authority common.PublicKey,
) *TransferChecked

NewTransferCheckedInstruction

Parameters:

amount:
decimals:
source: The source account.
mint: The token mint.
destination: The destination account.
authority: The source account's owner/delegate.

func NewTransferCheckedInstructionBuilder

func NewTransferCheckedInstructionBuilder() *TransferChecked

NewTransferCheckedInstructionBuilder creates a new `TransferChecked` instruction builder.

func (*TransferChecked) Build

func (obj *TransferChecked) Build() *Instruction

func (*TransferChecked) EncodeToTree

func (obj *TransferChecked) EncodeToTree(parent treeout.Branches)

func (*TransferChecked) GetAuthorityAccount

func (obj *TransferChecked) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. The source account's owner/delegate.

func (*TransferChecked) GetDestinationAccount

func (obj *TransferChecked) GetDestinationAccount() *common.AccountMeta

GetDestinationAccount gets the "destination" parameter. The destination account.

func (*TransferChecked) GetMintAccount

func (obj *TransferChecked) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The token mint.

func (*TransferChecked) GetSourceAccount

func (obj *TransferChecked) GetSourceAccount() *common.AccountMeta

GetSourceAccount gets the "source" parameter. The source account.

func (*TransferChecked) MarshalWithEncoder

func (obj *TransferChecked) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*TransferChecked) SetAmount

func (obj *TransferChecked) SetAmount(amount uint64) *TransferChecked

SetAmount sets the "amount" parameter.

func (*TransferChecked) SetAuthorityAccount

func (obj *TransferChecked) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *TransferChecked

SetAuthorityAccount sets the "authority" parameter. The source account's owner/delegate.

func (*TransferChecked) SetDecimals

func (obj *TransferChecked) SetDecimals(decimals uint8) *TransferChecked

SetDecimals sets the "decimals" parameter.

func (*TransferChecked) SetDestinationAccount

func (obj *TransferChecked) SetDestinationAccount(destination common.PublicKey) *TransferChecked

SetDestinationAccount sets the "destination" parameter. The destination account.

func (*TransferChecked) SetMintAccount

func (obj *TransferChecked) SetMintAccount(mint common.PublicKey) *TransferChecked

SetMintAccount sets the "mint" parameter. The token mint.

func (*TransferChecked) SetProgramId

func (obj *TransferChecked) SetProgramId(programId *common.PublicKey) *TransferChecked

func (*TransferChecked) SetSourceAccount

func (obj *TransferChecked) SetSourceAccount(source common.PublicKey) *TransferChecked

SetSourceAccount sets the "source" parameter. The source account.

func (*TransferChecked) UnmarshalWithDecoder

func (obj *TransferChecked) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*TransferChecked) Validate

func (obj *TransferChecked) Validate() error

func (*TransferChecked) ValidateAndBuild

func (obj *TransferChecked) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type TransferFeeExceedsMaximumError

type TransferFeeExceedsMaximumError struct{}

TransferFeeExceedsMaximumError Error: 30 `Transfer fee exceeds maximum of 10,000 basis points`

func (TransferFeeExceedsMaximumError) Code

func (TransferFeeExceedsMaximumError) Error

type TransferFeeExtension

type TransferFeeExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

TransferFeeExtension Instruction

func NewTransferFeeExtensionInstruction

func NewTransferFeeExtensionInstruction(
	data []byte,
) *TransferFeeExtension

NewTransferFeeExtensionInstruction

Parameters:

data:

func NewTransferFeeExtensionInstructionBuilder

func NewTransferFeeExtensionInstructionBuilder() *TransferFeeExtension

NewTransferFeeExtensionInstructionBuilder creates a new `TransferFeeExtension` instruction builder.

func (*TransferFeeExtension) Build

func (obj *TransferFeeExtension) Build() *Instruction

func (*TransferFeeExtension) EncodeToTree

func (obj *TransferFeeExtension) EncodeToTree(parent treeout.Branches)

func (*TransferFeeExtension) MarshalWithEncoder

func (obj *TransferFeeExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*TransferFeeExtension) SetData

func (obj *TransferFeeExtension) SetData(data []byte) *TransferFeeExtension

SetData sets the "data" parameter.

func (*TransferFeeExtension) SetProgramId

func (obj *TransferFeeExtension) SetProgramId(programId *common.PublicKey) *TransferFeeExtension

func (*TransferFeeExtension) UnmarshalWithDecoder

func (obj *TransferFeeExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*TransferFeeExtension) Validate

func (obj *TransferFeeExtension) Validate() error

func (*TransferFeeExtension) ValidateAndBuild

func (obj *TransferFeeExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type TransferHookExtension

type TransferHookExtension struct {
	Data                    []byte
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

TransferHookExtension Instruction

func NewTransferHookExtensionInstruction

func NewTransferHookExtensionInstruction(
	data []byte,
) *TransferHookExtension

NewTransferHookExtensionInstruction

Parameters:

data:

func NewTransferHookExtensionInstructionBuilder

func NewTransferHookExtensionInstructionBuilder() *TransferHookExtension

NewTransferHookExtensionInstructionBuilder creates a new `TransferHookExtension` instruction builder.

func (*TransferHookExtension) Build

func (obj *TransferHookExtension) Build() *Instruction

func (*TransferHookExtension) EncodeToTree

func (obj *TransferHookExtension) EncodeToTree(parent treeout.Branches)

func (*TransferHookExtension) MarshalWithEncoder

func (obj *TransferHookExtension) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*TransferHookExtension) SetData

func (obj *TransferHookExtension) SetData(data []byte) *TransferHookExtension

SetData sets the "data" parameter.

func (*TransferHookExtension) SetProgramId

func (obj *TransferHookExtension) SetProgramId(programId *common.PublicKey) *TransferHookExtension

func (*TransferHookExtension) UnmarshalWithDecoder

func (obj *TransferHookExtension) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*TransferHookExtension) Validate

func (obj *TransferHookExtension) Validate() error

func (*TransferHookExtension) ValidateAndBuild

func (obj *TransferHookExtension) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type UiAmountToAmount

type UiAmountToAmount struct {
	UiAmount *string
	// [0] = [] mint `The mint to calculate for`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

UiAmountToAmount Instruction

func NewUiAmountToAmountInstruction

func NewUiAmountToAmountInstruction(
	uiAmount string,
	mint common.PublicKey,
) *UiAmountToAmount

NewUiAmountToAmountInstruction

Parameters:

uiAmount:
mint: The mint to calculate for

func NewUiAmountToAmountInstructionBuilder

func NewUiAmountToAmountInstructionBuilder() *UiAmountToAmount

NewUiAmountToAmountInstructionBuilder creates a new `UiAmountToAmount` instruction builder.

func (*UiAmountToAmount) Build

func (obj *UiAmountToAmount) Build() *Instruction

func (*UiAmountToAmount) EncodeToTree

func (obj *UiAmountToAmount) EncodeToTree(parent treeout.Branches)

func (*UiAmountToAmount) GetMintAccount

func (obj *UiAmountToAmount) GetMintAccount() *common.AccountMeta

GetMintAccount gets the "mint" parameter. The mint to calculate for

func (*UiAmountToAmount) MarshalWithEncoder

func (obj *UiAmountToAmount) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*UiAmountToAmount) SetMintAccount

func (obj *UiAmountToAmount) SetMintAccount(mint common.PublicKey, multiSigners ...common.PublicKey) *UiAmountToAmount

SetMintAccount sets the "mint" parameter. The mint to calculate for

func (*UiAmountToAmount) SetProgramId

func (obj *UiAmountToAmount) SetProgramId(programId *common.PublicKey) *UiAmountToAmount

func (*UiAmountToAmount) SetUiAmount

func (obj *UiAmountToAmount) SetUiAmount(uiAmount string) *UiAmountToAmount

SetUiAmount sets the "uiAmount" parameter.

func (*UiAmountToAmount) UnmarshalWithDecoder

func (obj *UiAmountToAmount) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*UiAmountToAmount) Validate

func (obj *UiAmountToAmount) Validate() error

func (*UiAmountToAmount) ValidateAndBuild

func (obj *UiAmountToAmount) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type UninitializedStateError

type UninitializedStateError struct{}

UninitializedStateError Error: 9 `State is uninitialized`

func (UninitializedStateError) Code

func (e UninitializedStateError) Code() int

func (UninitializedStateError) Error

func (e UninitializedStateError) Error() string

type WithdrawExcessLamports

type WithdrawExcessLamports struct {
	// [0] = [WRITE] source `Source Account owned by the token program`
	// [1] = [WRITE] destination `Destination account`
	// [2] = [SIGNER] authority `Authority,3. ..2+M `[signer]` M signer accounts.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

WithdrawExcessLamports Instruction

func NewWithdrawExcessLamportsInstruction

func NewWithdrawExcessLamportsInstruction(
	source common.PublicKey,
	destination common.PublicKey,
	authority common.PublicKey,
) *WithdrawExcessLamports

NewWithdrawExcessLamportsInstruction

Parameters:

source: Source Account owned by the token program
destination: Destination account

authority: Authority
3. ..2+M `[signer]` M signer accounts.

func NewWithdrawExcessLamportsInstructionBuilder

func NewWithdrawExcessLamportsInstructionBuilder() *WithdrawExcessLamports

NewWithdrawExcessLamportsInstructionBuilder creates a new `WithdrawExcessLamports` instruction builder.

func (*WithdrawExcessLamports) Build

func (obj *WithdrawExcessLamports) Build() *Instruction

func (*WithdrawExcessLamports) EncodeToTree

func (obj *WithdrawExcessLamports) EncodeToTree(parent treeout.Branches)

func (*WithdrawExcessLamports) GetAuthorityAccount

func (obj *WithdrawExcessLamports) GetAuthorityAccount() *common.AccountMeta

GetAuthorityAccount gets the "authority" parameter. Authority 3. ..2+M `[signer]` M signer accounts.

func (*WithdrawExcessLamports) GetDestinationAccount

func (obj *WithdrawExcessLamports) GetDestinationAccount() *common.AccountMeta

GetDestinationAccount gets the "destination" parameter. Destination account

func (*WithdrawExcessLamports) GetSourceAccount

func (obj *WithdrawExcessLamports) GetSourceAccount() *common.AccountMeta

GetSourceAccount gets the "source" parameter. Source Account owned by the token program

func (*WithdrawExcessLamports) MarshalWithEncoder

func (obj *WithdrawExcessLamports) MarshalWithEncoder(encoder *binary.Encoder) (err error)

func (*WithdrawExcessLamports) SetAuthorityAccount

func (obj *WithdrawExcessLamports) SetAuthorityAccount(authority common.PublicKey, multiSigners ...common.PublicKey) *WithdrawExcessLamports

SetAuthorityAccount sets the "authority" parameter. Authority 3. ..2+M `[signer]` M signer accounts.

func (*WithdrawExcessLamports) SetDestinationAccount

func (obj *WithdrawExcessLamports) SetDestinationAccount(destination common.PublicKey) *WithdrawExcessLamports

SetDestinationAccount sets the "destination" parameter. Destination account

func (*WithdrawExcessLamports) SetProgramId

func (obj *WithdrawExcessLamports) SetProgramId(programId *common.PublicKey) *WithdrawExcessLamports

func (*WithdrawExcessLamports) SetSourceAccount

func (obj *WithdrawExcessLamports) SetSourceAccount(source common.PublicKey) *WithdrawExcessLamports

SetSourceAccount sets the "source" parameter. Source Account owned by the token program

func (*WithdrawExcessLamports) UnmarshalWithDecoder

func (obj *WithdrawExcessLamports) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)

func (*WithdrawExcessLamports) Validate

func (obj *WithdrawExcessLamports) Validate() error

func (*WithdrawExcessLamports) ValidateAndBuild

func (obj *WithdrawExcessLamports) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL