Documentation ¶
Index ¶
- Variables
- func SetProgramID(pubkey ag_solanago.PublicKey)
- type Create
- func (inst Create) Build() *MemoInstruction
- func (inst *Create) EncodeToTree(parent ag_treeout.Branches)
- func (inst *Create) GetSigner() *ag_solanago.AccountMeta
- func (inst Create) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *Create) SetMessage(message []byte) *Create
- func (inst *Create) SetSigner(signer ag_solanago.PublicKey) *Create
- func (inst *Create) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
- func (inst *Create) Validate() error
- func (inst Create) ValidateAndBuild() (*MemoInstruction, error)
- type MemoInstruction
- func (inst *MemoInstruction) Accounts() (out []*ag_solanago.AccountMeta)
- func (inst *MemoInstruction) Data() ([]byte, error)
- func (inst *MemoInstruction) EncodeToTree(parent treeout.Branches)
- func (inst MemoInstruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *MemoInstruction) ProgramID() ag_solanago.PublicKey
- func (inst *MemoInstruction) TextEncode(encoder *ag_text.Encoder, option *ag_text.Option) error
- func (inst *MemoInstruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
Constants ¶
This section is empty.
Variables ¶
View Source
var InstructionImplDef = ag_binary.NewVariantDefinition( ag_binary.NoTypeIDEncoding, []ag_binary.VariantType{ { Name: "Memo", Type: (*Create)(nil), }, }, )
View Source
var ProgramID = ag_solanago.MemoProgramID
Functions ¶
func SetProgramID ¶
func SetProgramID(pubkey ag_solanago.PublicKey)
Types ¶
type Create ¶
type Create struct { // The memo message Message []byte // [0] = [SIGNER] Signer // ··········· The account that will pay for the transaction ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"` }
func NewMemoInstruction ¶
func NewMemoInstruction( message []byte, signer ag_solanago.PublicKey) *Create
NewMemoInstruction declares a new Memo instruction with the provided parameters and accounts.
func NewMemoInstructionBuilder ¶
func NewMemoInstructionBuilder() *Create
NewMemoInstructionBuilder creates a new `Memo` instruction builder.
func (Create) Build ¶
func (inst Create) Build() *MemoInstruction
func (*Create) EncodeToTree ¶
func (inst *Create) EncodeToTree(parent ag_treeout.Branches)
func (*Create) GetSigner ¶
func (inst *Create) GetSigner() *ag_solanago.AccountMeta
func (Create) MarshalWithEncoder ¶
func (*Create) SetMessage ¶
SetMessage sets the memo message
func (*Create) SetSigner ¶
func (inst *Create) SetSigner(signer ag_solanago.PublicKey) *Create
SetSigner sets the signer account
func (*Create) UnmarshalWithDecoder ¶
func (Create) ValidateAndBuild ¶
func (inst Create) ValidateAndBuild() (*MemoInstruction, 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 MemoInstruction ¶
type MemoInstruction struct {
ag_binary.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*ag_solanago.AccountMeta, data []byte) (*MemoInstruction, error)
func (*MemoInstruction) Accounts ¶
func (inst *MemoInstruction) Accounts() (out []*ag_solanago.AccountMeta)
func (*MemoInstruction) Data ¶
func (inst *MemoInstruction) Data() ([]byte, error)
func (*MemoInstruction) EncodeToTree ¶
func (inst *MemoInstruction) EncodeToTree(parent treeout.Branches)
func (MemoInstruction) MarshalWithEncoder ¶
func (inst MemoInstruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error
func (*MemoInstruction) ProgramID ¶
func (inst *MemoInstruction) ProgramID() ag_solanago.PublicKey
func (*MemoInstruction) TextEncode ¶
func (*MemoInstruction) UnmarshalWithDecoder ¶
func (inst *MemoInstruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
Click to show internal directories.
Click to hide internal directories.