Documentation ¶
Index ¶
- Variables
- type AdvanceNonceAccount
- type Allocate
- type AllocateWithSeed
- type Assign
- type AssignWithSeed
- type AuthorizeNonceAccount
- type CreateAccount
- type CreateAccountAccounts
- type CreateAccountWithSeed
- type InitializeNonceAccount
- type Instruction
- func (i *Instruction) Accounts() (out []*solana.AccountMeta)
- func (i *Instruction) Data() ([]byte, error)
- func (i *Instruction) MarshalBinary(encoder *bin.Encoder) error
- func (i *Instruction) ProgramID() solana.PublicKey
- func (i *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error
- func (i *Instruction) UnmarshalBinary(decoder *bin.Decoder) error
- type Transfer
- type TransferAccounts
- type WithdrawNonceAccount
Constants ¶
This section is empty.
Variables ¶
View Source
var InstructionImplDef = bin.NewVariantDefinition(bin.Uint32TypeIDEncoding, []bin.VariantType{ {"create_account", (*CreateAccount)(nil)}, {"assign", (*Assign)(nil)}, {"transfer", (*Transfer)(nil)}, })
View Source
var PROGRAM_ID = solana.MustPublicKeyFromBase58("11111111111111111111111111111111")
Functions ¶
This section is empty.
Types ¶
type AdvanceNonceAccount ¶
type AdvanceNonceAccount struct { }
type AllocateWithSeed ¶
type AssignWithSeed ¶
type AuthorizeNonceAccount ¶
type CreateAccount ¶
type CreateAccount struct { Lamports bin.Uint64 Space bin.Uint64 Owner solana.PublicKey Accounts *CreateAccountAccounts `bin:"-"` }
func (*CreateAccount) SetAccounts ¶
func (i *CreateAccount) SetAccounts(accounts []*solana.AccountMeta) error
type CreateAccountAccounts ¶
type CreateAccountAccounts struct { From *solana.AccountMeta `text:"linear,notype"` New *solana.AccountMeta `text:"linear,notype"` }
type CreateAccountWithSeed ¶
type InitializeNonceAccount ¶
type Instruction ¶
type Instruction struct {
bin.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*solana.AccountMeta, data []byte) (*Instruction, error)
func NewCreateAccountInstruction ¶
func NewCreateAccountInstruction(lamports uint64, space uint64, owner, from, to solana.PublicKey) *Instruction
func (*Instruction) Accounts ¶
func (i *Instruction) Accounts() (out []*solana.AccountMeta)
func (*Instruction) Data ¶
func (i *Instruction) Data() ([]byte, error)
func (*Instruction) MarshalBinary ¶
func (i *Instruction) MarshalBinary(encoder *bin.Encoder) error
func (*Instruction) ProgramID ¶
func (i *Instruction) ProgramID() solana.PublicKey
func (*Instruction) TextEncode ¶
func (*Instruction) UnmarshalBinary ¶
func (i *Instruction) UnmarshalBinary(decoder *bin.Decoder) error
type Transfer ¶
type Transfer struct { // Prefixed with byte 0x02 Lamports bin.Uint64 Accounts *TransferAccounts `bin:"-"` }
func (*Transfer) SetAccounts ¶
func (i *Transfer) SetAccounts(accounts []*solana.AccountMeta) error
type TransferAccounts ¶
type TransferAccounts struct { From *solana.AccountMeta `text:"linear,notype"` To *solana.AccountMeta `text:"linear,notype"` }
type WithdrawNonceAccount ¶
Click to show internal directories.
Click to hide internal directories.