associated_token_account

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(param CreateParam) types.Instruction

Create creates an associated token account for the given wallet address and token mint. Return an error if the account exists.

func CreateAssociatedTokenAccount

func CreateAssociatedTokenAccount(param CreateAssociatedTokenAccountParam) types.Instruction

CreateAssociatedTokenAccount creates an associated token account for the given wallet address and token mint. Return an error if the account exists. Deprecated: please use `Create`

func CreateIdempotent

func CreateIdempotent(param CreateIdempotentParam) types.Instruction

CreateIdempotent creates an associated token account for the given wallet address and token mint, if it doesn't already exist. Returns an error if the account exists, but with a different owner.

func RecoverNested

func RecoverNested(param RecoverNestedParam) types.Instruction

RecoverNested transfers from and closes a nested associated token account: an associated token account owned by an associated token account.

Types

type CreateAssociatedTokenAccountParam

type CreateAssociatedTokenAccountParam struct {
	Funder                 common.PublicKey
	Owner                  common.PublicKey
	Mint                   common.PublicKey
	AssociatedTokenAccount common.PublicKey
}

type CreateIdempotentParam

type CreateIdempotentParam struct {
	Funder                 common.PublicKey
	Owner                  common.PublicKey
	Mint                   common.PublicKey
	AssociatedTokenAccount common.PublicKey
}

type CreateParam

type CreateParam struct {
	Funder                 common.PublicKey
	Owner                  common.PublicKey
	Mint                   common.PublicKey
	AssociatedTokenAccount common.PublicKey
}

type Instruction

type Instruction borsh.Enum
const (
	InstructionCreate Instruction = iota
	InstructionCreateIdempotent
	InstructionRecoverNested
)

type RecoverNestedParam

type RecoverNestedParam struct {
	Owner                             common.PublicKey
	OwnerMint                         common.PublicKey
	OwnerAssociatedTokenAccount       common.PublicKey
	NestedMint                        common.PublicKey
	NestedMintAssociatedTokenAccount  common.PublicKey
	DestinationAssociatedTokenAccount common.PublicKey
}

Jump to

Keyboard shortcuts

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