SPLTokenProgram.mintTo constructor

SPLTokenProgram.mintTo({
  1. required SPLTokenMintToLayout layout,
  2. required SolAddress mint,
  3. required SolAddress destination,
  4. required SolAddress authority,
  5. SolAddress programId = SPLTokenProgramConst.tokenProgramId,
  6. 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);
}