SPLTokenProgram.approve constructor
SPLTokenProgram.approve({
- required SPLTokenApproveLayout layout,
- required SolAddress account,
- required SolAddress delegate,
- required SolAddress owner,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
- List<
SolAddress> multiSigners = const [],
Approves a delegate. A delegate is given the authority over tokens on behalf of the source account's owner.
Implementation
factory SPLTokenProgram.approve(
{required SPLTokenApproveLayout layout,
/// The source account.
required SolAddress account,
/// The delegate.
required SolAddress delegate,
/// The source account owner.
required SolAddress owner,
SolAddress programId = SPLTokenProgramConst.tokenProgramId,
/// Multisignature owner
List<SolAddress> multiSigners = const []}) {
return SPLTokenProgram(
layout: layout,
keys: SPLTokenUtils.buildKeys(
keys: [account.toWritable(), delegate.toReadOnly()],
owner: owner,
multiSigners: multiSigners),
programId: programId);
}