associatedtokenaccount

package
v0.0.0-...-33cbf18 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 (i *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error

func (*Instruction) UnmarshalBinary

func (i *Instruction) UnmarshalBinary(decoder *bin.Decoder) (err error)

Jump to

Keyboard shortcuts

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