StakeProgram.merge constructor

StakeProgram.merge({
  1. required SolAddress stakePubkey,
  2. required SolAddress authorizedPubkey,
  3. required SolAddress sourceStakePubKey,
})

Generate a Transaction that merges Stake accounts.

Implementation

factory StakeProgram.merge(
    {required SolAddress stakePubkey,
    required SolAddress authorizedPubkey,
    required SolAddress sourceStakePubKey}) {
  return StakeProgram(
      layout: StakeMergeLayout(),
      keys: [
        stakePubkey.toWritable(),
        sourceStakePubKey.toWritable(),
        SystemProgramConst.sysvarClockPubkey.toReadOnly(),
        SystemProgramConst.sysvarStakeHistoryPubkey.toReadOnly(),
        authorizedPubkey.toSigner(),
      ],
      programId: StakeProgramConst.programId);
}