VoteProgram.authorizeWithSeed constructor

VoteProgram.authorizeWithSeed({
  1. required VoteProgramAuthorizeWithSeedLayout layout,
  2. required SolAddress votePubkey,
  3. required SolAddress currentAuthorityDerivedKeyBasePubkey,
})

Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account where the current Voter or Withdrawer authority is a derived key.

Implementation

factory VoteProgram.authorizeWithSeed(
    {required VoteProgramAuthorizeWithSeedLayout layout,
    required SolAddress votePubkey,
    required SolAddress currentAuthorityDerivedKeyBasePubkey}) {
  return VoteProgram(
      layout: layout,
      keys: [
        votePubkey.toWritable(),
        SystemProgramConst.sysvarClockPubkey.toReadOnly(),
        currentAuthorityDerivedKeyBasePubkey.toSigner(),
      ],
      programId: VoteProgramConst.programId);
}