AssociatedTokenAccountProgram.associatedTokenAccountIdempotent constructor
AssociatedTokenAccountProgram.associatedTokenAccountIdempotent({
- required SolAddress payer,
- required SolAddress associatedToken,
- required SolAddress owner,
- required SolAddress mint,
- SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
- SolAddress associatedTokenProgramId = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
Factory method for creating an associated token account idempotent
Implementation
factory AssociatedTokenAccountProgram.associatedTokenAccountIdempotent({
/// Payer of the initialization fees
required SolAddress payer,
/// New associated token account
required SolAddress associatedToken,
/// Owner of the new account
required SolAddress owner,
/// Token mint account
required SolAddress mint,
/// SPL Token program account
SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
/// SPL Associated Token program account
SolAddress associatedTokenProgramId =
AssociatedTokenAccountProgramConst.associatedTokenProgramId,
}) {
return _associatedTokenAccount(
payer: payer,
associatedToken: associatedToken,
owner: owner,
mint: mint,
tokenProgramId: tokenProgramId,
programId: associatedTokenProgramId,
layout: const AssociatedTokenAccountProgramIdempotentLayout());
}