memo_transfer

package
v0.0.0-...-fac452d Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MEMO_TRANSFER_SIZE = 1
View Source
const ProgramName = "memo_transfer"

Variables

View Source
var (
	Instruction_Enable  uint8 = 0
	Instruction_Disable uint8 = 1
)
View Source
var InstructionImplDef = binary.NewVariantDefinition(binary.Uint8TypeIDEncoding, []binary.VariantType{
	{
		"enable", (*Enable)(nil),
	},
	{
		"disable", (*Disable)(nil),
	},
})
View Source
var ProgramID common.PublicKey = common.MustPublicKeyFromBase58("11111111111111111111111111111111")

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 Disable

type Disable struct {
	// [0] = [WRITE] account `The account to update.`
	// [1] = [SIGNER] accountOwner `The account's owner. or The account's multisignature owner.,..2+M `[signer]` M signer accounts.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Disable Instruction

func NewDisableInstruction

func NewDisableInstruction(
	account common.PublicKey,
	accountOwner common.PublicKey,
) *Disable

NewDisableInstruction

Parameters:

account: The account to update.

accountOwner: The account's owner. or The account's multisignature owner.
..2+M `[signer]` M signer accounts.

func NewDisableInstructionBuilder

func NewDisableInstructionBuilder() *Disable

NewDisableInstructionBuilder creates a new `Disable` instruction builder.

func (*Disable) Build

func (obj *Disable) Build() *Instruction

func (*Disable) EncodeToTree

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

func (*Disable) GetAccountAccount

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

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

func (*Disable) GetAccountOwnerAccount

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

GetAccountOwnerAccount gets the "accountOwner" parameter. The account's owner. or The account's multisignature owner. ..2+M `[signer]` M signer accounts.

func (*Disable) MarshalWithEncoder

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

func (*Disable) SetAccountAccount

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

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

func (*Disable) SetAccountOwnerAccount

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

SetAccountOwnerAccount sets the "accountOwner" parameter. The account's owner. or The account's multisignature owner. ..2+M `[signer]` M signer accounts.

func (*Disable) SetProgramId

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

func (*Disable) UnmarshalWithDecoder

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

func (*Disable) Validate

func (obj *Disable) Validate() error

func (*Disable) ValidateAndBuild

func (obj *Disable) 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 Enable

type Enable struct {
	// [0] = [WRITE] account `The account to update.`
	// [1] = [SIGNER] accountOwner `The account's owner. or The account's multisignature owner.,..2+M `[signer]` M signer accounts.`
	common.AccountMetaSlice `bin:"-"`
	// contains filtered or unexported fields
}

Enable Instruction

func NewEnableInstruction

func NewEnableInstruction(
	account common.PublicKey,
	accountOwner common.PublicKey,
) *Enable

NewEnableInstruction

Parameters:

account: The account to update.

accountOwner: The account's owner. or The account's multisignature owner.
..2+M `[signer]` M signer accounts.

func NewEnableInstructionBuilder

func NewEnableInstructionBuilder() *Enable

NewEnableInstructionBuilder creates a new `Enable` instruction builder.

func (*Enable) Build

func (obj *Enable) Build() *Instruction

func (*Enable) EncodeToTree

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

func (*Enable) GetAccountAccount

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

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

func (*Enable) GetAccountOwnerAccount

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

GetAccountOwnerAccount gets the "accountOwner" parameter. The account's owner. or The account's multisignature owner. ..2+M `[signer]` M signer accounts.

func (*Enable) MarshalWithEncoder

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

func (*Enable) SetAccountAccount

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

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

func (*Enable) SetAccountOwnerAccount

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

SetAccountOwnerAccount sets the "accountOwner" parameter. The account's owner. or The account's multisignature owner. ..2+M `[signer]` M signer accounts.

func (*Enable) SetProgramId

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

func (*Enable) UnmarshalWithDecoder

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

func (*Enable) Validate

func (obj *Enable) Validate() error

func (*Enable) ValidateAndBuild

func (obj *Enable) 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 MemoTransfer

type MemoTransfer struct {
	// Require transfers into this account to be accompanied by a memo
	RequireIncomingTransferMemos bool
}

MemoTransfer Struct Data struct for a `TokenGroup`

func (*MemoTransfer) MarshalWithEncoder

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

func (*MemoTransfer) UnmarshalWithDecoder

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

Jump to

Keyboard shortcuts

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