SPLTokenProgram.transfer constructor
SPLTokenProgram.transfer({
- required SPLTokenTransferLayout layout,
- required SolAddress source,
- required SolAddress destination,
- required SolAddress owner,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
- List<
SolAddress> multiSigners = const [],
Transfers tokens from one account to another either directly or via a delegate. If this account is associated with the native mint then equal amounts of SOL and Tokens will be transferred to the destination account.
Implementation
factory SPLTokenProgram.transfer({
required SPLTokenTransferLayout layout,
/// The source account.
required SolAddress source,
/// The destination account.
required SolAddress destination,
/// The source 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: [
source.toWritable(),
destination.toWritable(),
], owner: owner, multiSigners: multiSigners),
programId: programId);
}