VoteProgram.withdraw constructor
VoteProgram.withdraw({
- required VoteProgramWithdrawLayout layout,
- required SolAddress votePubkey,
- required SolAddress authorizedWithdrawerPubkey,
- required SolAddress toPubkey,
Generate a transaction to withdraw from a Vote account.
Implementation
factory VoteProgram.withdraw({
required VoteProgramWithdrawLayout layout,
required SolAddress votePubkey,
required SolAddress authorizedWithdrawerPubkey,
required SolAddress toPubkey,
}) {
return VoteProgram(
layout: layout,
keys: [
votePubkey.toWritable(),
toPubkey.toWritable(),
authorizedWithdrawerPubkey.toSigner(),
],
programId: VoteProgramConst.programId);
}