associatedaccount

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	Payer          common.Address `bin:"-" borsh_skip:"true"`
	Wallet         common.Address `bin:"-" borsh_skip:"true"`
	Mint           common.Address `bin:"-" borsh_skip:"true"`
	TokenProgramID common.Address `bin:"-" borsh_skip:"true"`

	// [0] = [WRITE, SIGNER] Payer
	// ··········· Funding account
	//
	// [1] = [WRITE] AssociatedTokenAccount
	// ··········· Associated token account address to be created
	//
	// [2] = [] Wallet
	// ··········· Wallet address for the new associated token account
	//
	// [3] = [] TokenMint
	// ··········· The token mint for the new associated token account
	//
	// [4] = [] SystemProgram
	// ··········· System program ID
	//
	// [5] = [] TokenProgram
	// ··········· SPL token program ID
	//
	// [6] = [] SysVarRent
	// ··········· SysVarRentPubkey
	base.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}

func NewCreateInstruction

func NewCreateInstruction(
	payer common.Address,
	walletAddress common.Address,
	splTokenMintAddress common.Address,
) *Create

func NewCreateInstructionBuilder

func NewCreateInstructionBuilder() *Create

NewCreateInstructionBuilder creates a new `Create` instruction builder.

func (Create) Build

func (inst Create) Build() *Instruction

func (Create) MarshalWithEncoder

func (inst Create) MarshalWithEncoder(encoder *encodbin.Encoder) error

func (*Create) SetMint

func (inst *Create) SetMint(mint common.Address) *Create

func (*Create) SetPayer

func (inst *Create) SetPayer(payer common.Address) *Create

func (*Create) SetTokenProgramID

func (inst *Create) SetTokenProgramID(tokenProgramID common.Address) *Create

func (*Create) SetWallet

func (inst *Create) SetWallet(wallet common.Address) *Create

type Instruction

type Instruction struct {
	encodbin.BaseVariant
}

func (*Instruction) Accounts

func (inst *Instruction) Accounts() (out []*base.AccountMeta)

func (*Instruction) Data

func (inst *Instruction) Data() ([]byte, error)

func (*Instruction) MarshalWithEncoder

func (inst *Instruction) MarshalWithEncoder(encoder *encodbin.Encoder) error

func (*Instruction) ProgramID

func (inst *Instruction) ProgramID() common.Address

Jump to

Keyboard shortcuts

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