StakeProgram.authorizeWithSeed constructor
StakeProgram.authorizeWithSeed({
- required StakeAuthorizeWithSeedLayout layout,
- required SolAddress stakePubkey,
- required SolAddress authorityBase,
- SolAddress? custodianPubkey,
Generate a Transaction that authorizes a new PublicKey as Staker or Withdrawer on the Stake account.
Implementation
factory StakeProgram.authorizeWithSeed(
{required StakeAuthorizeWithSeedLayout layout,
required SolAddress stakePubkey,
required SolAddress authorityBase,
SolAddress? custodianPubkey}) {
return StakeProgram(
layout: layout,
keys: [
stakePubkey.toWritable(),
authorityBase.toSigner(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
if (custodianPubkey != null) custodianPubkey.toSigner(),
],
programId: StakeProgramConst.programId);
}