Documentation ¶
Index ¶
- Constants
- Variables
- func InstructionIDToName(id uint8) string
- func SetProgramID(pubkey common.PublicKey)
- type Disable
- func (obj *Disable) Build() *Instruction
- func (obj *Disable) EncodeToTree(parent treeout.Branches)
- func (obj *Disable) GetAccountAccount() *common.AccountMeta
- func (obj *Disable) GetAccountOwnerAccount() *common.AccountMeta
- func (obj *Disable) MarshalWithEncoder(encoder *binary.Encoder) (err error)
- func (obj *Disable) SetAccountAccount(account common.PublicKey) *Disable
- func (obj *Disable) SetAccountOwnerAccount(accountOwner common.PublicKey, multiSigners ...common.PublicKey) *Disable
- func (obj *Disable) SetProgramId(programId *common.PublicKey) *Disable
- func (obj *Disable) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)
- func (obj *Disable) Validate() error
- func (obj *Disable) ValidateAndBuild() (*Instruction, error)
- type Enable
- func (obj *Enable) Build() *Instruction
- func (obj *Enable) EncodeToTree(parent treeout.Branches)
- func (obj *Enable) GetAccountAccount() *common.AccountMeta
- func (obj *Enable) GetAccountOwnerAccount() *common.AccountMeta
- func (obj *Enable) MarshalWithEncoder(encoder *binary.Encoder) (err error)
- func (obj *Enable) SetAccountAccount(account common.PublicKey) *Enable
- func (obj *Enable) SetAccountOwnerAccount(accountOwner common.PublicKey, multiSigners ...common.PublicKey) *Enable
- func (obj *Enable) SetProgramId(programId *common.PublicKey) *Enable
- func (obj *Enable) UnmarshalWithDecoder(decoder *binary.Decoder) (err error)
- func (obj *Enable) Validate() error
- func (obj *Enable) ValidateAndBuild() (*Instruction, error)
- type Instruction
- func (obj *Instruction) Accounts() (out []*common.AccountMeta)
- func (obj *Instruction) Data() ([]byte, error)
- func (obj *Instruction) EncodeToTree(parent treeout.Branches)
- func (obj *Instruction) MarshalWithEncoder(encoder *binary.Encoder) error
- func (obj *Instruction) ProgramID() common.PublicKey
- func (obj *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error
- func (obj *Instruction) UnmarshalWithDecoder(decoder *binary.Decoder) error
- type MemoTransfer
Constants ¶
const MEMO_TRANSFER_SIZE = 1
const ProgramName = "memo_transfer"
Variables ¶
var ( Instruction_Enable uint8 = 0 Instruction_Disable uint8 = 1 )
var InstructionImplDef = binary.NewVariantDefinition(binary.Uint8TypeIDEncoding, []binary.VariantType{ { "enable", (*Enable)(nil), }, { "disable", (*Disable)(nil), }, })
var ProgramID common.PublicKey = common.MustPublicKeyFromBase58("11111111111111111111111111111111")
Functions ¶
func InstructionIDToName ¶
InstructionIDToName returns the name of the instruction given its ID.
func SetProgramID ¶
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 ¶
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 (*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 (*Disable) SetAccountAccount ¶
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 (*Disable) UnmarshalWithDecoder ¶
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 ¶
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 (*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 (*Enable) SetAccountAccount ¶
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) UnmarshalWithDecoder ¶
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 (*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)