SPLTokenProgram.initializeMultisig constructor
SPLTokenProgram.initializeMultisig({
- required SPLTokenInitializeMultisigLayout layout,
- required SolAddress account,
- required List<
SolAddress> signers, - SolAddress programId = SPLTokenProgramConst.tokenProgramId,
Initializes a multisignature account with N provided signers.
Multisignature accounts can used in place of any single owner/delegate accounts in any token instruction that require an owner/delegate to be present. The variant field represents the number of signers (M) required to validate this multisignature account.
Implementation
factory SPLTokenProgram.initializeMultisig(
{required SPLTokenInitializeMultisigLayout layout,
/// The multisignature account to initialize.
required SolAddress account,
/// The signer accounts
required List<SolAddress> signers,
SolAddress programId = SPLTokenProgramConst.tokenProgramId}) {
return SPLTokenProgram(
layout: layout,
keys: [
account.toWritable(),
SystemProgramConst.sysvarRentPubkey.toReadOnly(),
...signers.map((e) => e.toReadOnly())
],
programId: programId);
}