StakeProgram.initialize constructor

StakeProgram.initialize({
  1. required StakeInitializeLayout layout,
  2. required SolAddress stakePubkey,
})

Generate an Initialize instruction to add to a Stake Create transactio

Implementation

factory StakeProgram.initialize(
    {required StakeInitializeLayout layout,
    required SolAddress stakePubkey}) {
  return StakeProgram(
      layout: layout,
      keys: [
        stakePubkey.toWritable(),
        SystemProgramConst.sysvarRentPubkey.toReadOnly(),
      ],
      programId: StakeProgramConst.programId);
}