SPLTokenProgram.burn constructor
SPLTokenProgram.burn({
- required SPLTokenBurnLayout layout,
- required SolAddress account,
- required SolAddress mint,
- required SolAddress owner,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
- List<
SolAddress> multiSigners = const [],
Burns tokens by removing them from an account. SPLTokenProgram.burn does not support accounts associated with the native mint, use SPLTokenProgram.closeAccount instead.
Implementation
factory SPLTokenProgram.burn(
{required SPLTokenBurnLayout layout,
/// The account to burn from.
required SolAddress account,
/// The token mint.
required SolAddress mint,
/// The account's owner/delegate.
required SolAddress owner,
SolAddress programId = SPLTokenProgramConst.tokenProgramId,
/// Multisignature owner/delegate
List<SolAddress> multiSigners = const []}) {
return SPLTokenProgram(
layout: layout,
keys: SPLTokenUtils.buildKeys(keys: [
account.toWritable(),
mint.toWritable(),
], owner: owner, multiSigners: multiSigners),
programId: programId);
}