StakeProgram.deactivate constructor

StakeProgram.deactivate({
  1. required SolAddress stakePubkey,
  2. required SolAddress authorizedPubkey,
})

Generate a Transaction that deactivates Stake tokens.

Implementation

factory StakeProgram.deactivate(
    {required SolAddress stakePubkey, required SolAddress authorizedPubkey}) {
  return StakeProgram(
      layout: const StakeDeactivateLayout(),
      keys: [
        stakePubkey.toWritable(),
        SystemProgramConst.sysvarClockPubkey.toReadOnly(),
        authorizedPubkey.toSigner(),
      ],
      programId: StakeProgramConst.programId);
}