StakeProgram.initialize constructor
StakeProgram.initialize({
- required StakeInitializeLayout layout,
- 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);
}