SPLTokenProgram.initializeMint constructor
SPLTokenProgram.initializeMint({
- required SPLTokenInitializeMintLayout layout,
- required SolAddress mint,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
Initializes a new mint and optionally deposits all the newly minted tokens in an account.
Implementation
factory SPLTokenProgram.initializeMint(
{required SPLTokenInitializeMintLayout layout,
/// The mint to initialize.
required SolAddress mint,
SolAddress programId = SPLTokenProgramConst.tokenProgramId}) {
return SPLTokenProgram(
layout: layout,
keys: [
mint.toWritable(),
SystemProgramConst.sysvarRentPubkey.toReadOnly()
],
programId: programId);
}