StakeProgram.split constructor

StakeProgram.split({
  1. required StakeSplitLayout layout,
  2. required SolAddress stakePubkey,
  3. required SolAddress authorizedPubkey,
  4. required SolAddress splitStakePubkey,
})

Generate a Transaction that splits Stake tokens into another stake account

Implementation

factory StakeProgram.split(
    {required StakeSplitLayout layout,
    required SolAddress stakePubkey,
    required SolAddress authorizedPubkey,
    required SolAddress splitStakePubkey}) {
  return StakeProgram(
      layout: layout,
      keys: [
        stakePubkey.toWritable(),
        splitStakePubkey.toWritable(),
        authorizedPubkey.toSigner(),
      ],
      programId: StakeProgramConst.programId);
}