AssociatedTokenProgram class

Associated Token Program

Associated Token Program

Inheritance

Properties

hashCode → int
The hash code for this object.
no setterinherited
pubkey → Pubkey
The public key that identifies this program (i.e. program id).
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkDeployed(Connection connection) → Future<void>
Check that the program has been deployed to the cluster and is an executable program.
inherited
createTransactionIntruction(Enum instruction, {required List<AccountMeta> keys, List<Iterable<int>> data = const []}) → TransactionInstruction
Creates a TransactionInstruction for the program instruction.
inherited
encodeInstruction<T extends Enum>(T instruction) → Iterable<int>
Encodes the program instruction.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

programId → Pubkey
The program id.
no setter

Static Methods

create({required Pubkey fundingAccount, required Pubkey associatedTokenAccount, required Pubkey associatedTokenAccountOwner, required Pubkey tokenMint}) → TransactionInstruction
Creates an associated token account for the given wallet address and token mint.
createIdempotent({required Pubkey fundingAccount, required Pubkey associatedTokenAccount, required Pubkey associatedTokenAccountOwner, required Pubkey tokenMint}) → TransactionInstruction
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.
recoverNested({required Pubkey nestedAssociatedTokenAccount, required Pubkey nestedAssociatedTokenMint, required Pubkey nestedAssociatedTokenAccountOwner, required Pubkey associatedTokenAccount, required Pubkey associatedTokenMint, required Pubkey associatedTokenAccountOwner}) → TransactionInstruction
Transfers from and closes a nested associated token account: an associated token account owned by an associated token account.