AssociatedTokenAccountProgram.associatedTokenAccount constructor
AssociatedTokenAccountProgram.associatedTokenAccount({
- 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
Implementation
factory AssociatedTokenAccountProgram.associatedTokenAccount({
/// 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 AssociatedTokenAccountProgramInitializeLayout());
}