SPLTokenProgram.initializePermanentDelegate constructor
SPLTokenProgram.initializePermanentDelegate({
- required SPLTokenInitializePermanentDelegateLayout layout,
- required SolAddress mint,
- required SolAddress programId,
Initialize the permanent delegate on a new mint.
Implementation
factory SPLTokenProgram.initializePermanentDelegate(
{required SPLTokenInitializePermanentDelegateLayout layout,
required SolAddress mint,
required SolAddress programId}) {
if (programId == SPLTokenProgramConst.tokenProgramId) {
throw const MessageException("Token program does not support extensions");
}
return SPLTokenProgram(
layout: layout, keys: [mint.toWritable()], programId: programId);
}