SPLTokenProgram.initializeMintCloseAuthority constructor
SPLTokenProgram.initializeMintCloseAuthority({
- required SPLTokenInitializeMintCloseAuthorityLayout layout,
- required SolAddress mint,
- required SolAddress programId,
Initialize the close account authority on a new mint.
Implementation
factory SPLTokenProgram.initializeMintCloseAuthority(
{required SPLTokenInitializeMintCloseAuthorityLayout layout,
/// The mint to initialize.
required SolAddress mint,
required SolAddress programId}) {
if (programId == SPLTokenProgramConst.tokenProgramId) {
throw const SolanaPluginException(
"Token program does not support extensions");
}
return SPLTokenProgram(
layout: layout, keys: [mint.toWritable()], programId: programId);
}