SPLTokenProgram.setAuthority constructor
SPLTokenProgram.setAuthority({
- required SPLTokenSetAuthorityLayout layout,
- required SolAddress account,
- required SolAddress currentAuthority,
- SolAddress programId = SPLTokenProgramConst.tokenProgramId,
- List<
SolAddress> multiSigners = const [],
Sets a new authority of a mint or account.
Implementation
factory SPLTokenProgram.setAuthority({
required SPLTokenSetAuthorityLayout layout,
/// The mint or account to change the authority of.
required SolAddress account,
/// The current authority of the mint or account.
required SolAddress currentAuthority,
SolAddress programId = SPLTokenProgramConst.tokenProgramId,
/// Multisignature authority.
List<SolAddress> multiSigners = const [],
}) {
return SPLTokenProgram(
layout: layout,
keys: SPLTokenUtils.buildKeys(keys: [
account.toWritable(),
], owner: currentAuthority, multiSigners: multiSigners),
programId: programId);
}