SPLTokenProgram.initializeNonTransferableMint constructor
SPLTokenProgram.initializeNonTransferableMint({
- required SolAddress mint,
- required SolAddress programId,
Initialize the non transferable extension for the given mint account
Implementation
factory SPLTokenProgram.initializeNonTransferableMint(
{
/// The mint account to initialize.
required SolAddress mint,
required SolAddress programId}) {
if (programId == SPLTokenProgramConst.tokenProgramId) {
throw const MessageException("Token program does not support extensions");
}
return SPLTokenProgram(
layout: SPLTokenInitializeNonTransferableMintLayout(),
keys: [mint.toWritable()],
programId: programId);
}