StakeInstruction.setLockupChecked constructor
StakeInstruction.setLockupChecked({
- required Ed25519HDPublicKey stake,
- required Ed25519HDPublicKey authority,
- required LockupCheckedArgs lockupCheckedArgs,
Set stake lockup.
This instruction behaves like SetLockup with the additional requirement
that the new lockup authority also be a signer.
If a lockup is not active, the withdraw authority may set a new lockup If a lockup is active, the lockup custodian may update the lockup parameters
Implementation
factory StakeInstruction.setLockupChecked({
required Ed25519HDPublicKey stake,
required Ed25519HDPublicKey authority,
required LockupCheckedArgs lockupCheckedArgs,
}) =>
StakeInstruction._(
accounts: [
AccountMeta.writeable(pubKey: stake, isSigner: false),
AccountMeta.writeable(pubKey: authority, isSigner: true),
],
data: ByteArray.merge([
StakeProgram.setLockupInstructionIndex,
lockupCheckedArgs.serialize(),
]),
);