AssociatedTokenAccountProgram.recoverNested constructor
AssociatedTokenAccountProgram.recoverNested({
- required SolAddress nestedAssociatedToken,
- required SolAddress nestedMint,
- required SolAddress destinationAssociatedToken,
- required SolAddress ownerAssociatedToken,
- required SolAddress ownerMint,
- required SolAddress owner,
- SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
- SolAddress associatedTokenProgramId = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
Factory method for recovering a nested associated token account
Implementation
factory AssociatedTokenAccountProgram.recoverNested({
/// Nested associated token account
required SolAddress nestedAssociatedToken,
/// Token mint for the nested associated token account
required SolAddress nestedMint,
/// Wallet's associated token account
required SolAddress destinationAssociatedToken,
/// Owner associated token account address
required SolAddress ownerAssociatedToken,
/// Token mint for the owner associated token account
required SolAddress ownerMint,
/// Wallet address for the owner associated token account
required SolAddress owner,
/// SPL Token program account
SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
/// SPL Associated Token program account
SolAddress associatedTokenProgramId =
AssociatedTokenAccountProgramConst.associatedTokenProgramId,
}) {
return AssociatedTokenAccountProgram(
keys: [
nestedAssociatedToken.toWritable(),
nestedMint.toReadOnly(),
destinationAssociatedToken.toWritable(),
ownerAssociatedToken.toWritable(),
ownerMint.toReadOnly(),
owner.toSignerAndWritable(),
tokenProgramId.toReadOnly(),
],
programId: associatedTokenProgramId,
layout: AssociatedTokenAccountProgramRecoverNestedLayout());
}