SPLTokenProgram.mintTo constructor
SPLTokenProgram.mintTo({
- required SPLTokenMintToLayout layout,
- required SolAddress mint,
- required SolAddress destination,
- required SolAddress authority,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
- List<
SolAddress> multiSigners = const [],
Mints new tokens to an account. The native mint does not support minting.
Implementation
factory SPLTokenProgram.mintTo(
{required SPLTokenMintToLayout layout,
/// The mint.
required SolAddress mint,
/// The account to mint tokens to.
required SolAddress destination,
/// The mint's minting authority.
required SolAddress authority,
SolAddress programId = SPLTokenProgramConst.tokenProgramId,
List<SolAddress> multiSigners = const []}) {
return SPLTokenProgram(
layout: layout,
keys: SPLTokenUtils.buildKeys(keys: [
mint.toWritable(),
destination.toWritable(),
], owner: authority, multiSigners: multiSigners),
programId: programId);
}