Documentation ¶
Index ¶
- Variables
- func MustGetAssociatedTokenAddress(mint, programId, owner solana.PublicKey) solana.PublicKey
- type Create
- type CreateAccounts
- 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) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var InstructionDefVariant = bin.NewVariantDefinition(bin.Uint8TypeIDEncoding, []bin.VariantType{ {"create", (*Create)(nil)}, })
View Source
var PROGRAM_ID = solana.MustPublicKeyFromBase58("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL")
Functions ¶
func MustGetAssociatedTokenAddress ¶
func MustGetAssociatedTokenAddress(mint, programId, owner solana.PublicKey) solana.PublicKey
Types ¶
type Create ¶
type Create struct {
Accounts *CreateAccounts `bin:"-"`
}
type CreateAccounts ¶
type CreateAccounts struct { FundingAccount *solana.AccountMeta AssociatedTokenAccount *solana.AccountMeta AssociatedTokenAccountWallet *solana.AccountMeta Mint *solana.AccountMeta SystemProgram *solana.AccountMeta SPLTokenProgram *solana.AccountMeta RentProgram *solana.AccountMeta }
type Instruction ¶
type Instruction struct {
bin.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*solana.AccountMeta, data []byte) (*Instruction, error)
func NewCreateInstruction ¶
func NewCreateInstruction( fundingAccount solana.PublicKey, associatedTokenAccount solana.PublicKey, associatedTokenAccountWallet solana.PublicKey, mint solana.PublicKey, tokenProgramId 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) (err error)
Click to show internal directories.
Click to hide internal directories.