pub enum VoteInstruction {
Show 16 variants
InitializeAccount(VoteInit),
Authorize(Pubkey, VoteAuthorize),
Vote(Vote),
Withdraw(u64),
UpdateValidatorIdentity,
UpdateCommission(u8),
VoteSwitch(Vote, Hash),
AuthorizeChecked(VoteAuthorize),
UpdateVoteState(VoteStateUpdate),
UpdateVoteStateSwitch(VoteStateUpdate, Hash),
AuthorizeWithSeed(VoteAuthorizeWithSeedArgs),
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs),
CompactUpdateVoteState(VoteStateUpdate),
CompactUpdateVoteStateSwitch(VoteStateUpdate, Hash),
TowerSync(TowerSync),
TowerSyncSwitch(TowerSync, Hash),
}
Variants§
InitializeAccount(VoteInit)
Initialize a vote account
§Account references
[WRITE]
Uninitialized vote account[]
Rent sysvar[]
Clock sysvar[SIGNER]
New validator identity (node_pubkey)
Authorize(Pubkey, VoteAuthorize)
Authorize a key to send votes or issue a withdrawal
§Account references
[WRITE]
Vote account to be updated with the Pubkey for authorization[]
Clock sysvar[SIGNER]
Vote or withdraw authority
Vote(Vote)
A Vote instruction with recent votes
§Account references
[WRITE]
Vote account to vote with[]
Slot hashes sysvar[]
Clock sysvar[SIGNER]
Vote authority
Withdraw(u64)
Withdraw some amount of funds
§Account references
[WRITE]
Vote account to withdraw from[WRITE]
Recipient account[SIGNER]
Withdraw authority
UpdateValidatorIdentity
Update the vote account’s validator identity (node_pubkey)
§Account references
[WRITE]
Vote account to be updated with the given authority public key[SIGNER]
New validator identity (node_pubkey)[SIGNER]
Withdraw authority
UpdateCommission(u8)
Update the commission for the vote account
§Account references
[WRITE]
Vote account to be updated[SIGNER]
Withdraw authority
VoteSwitch(Vote, Hash)
A Vote instruction with recent votes
§Account references
[WRITE]
Vote account to vote with[]
Slot hashes sysvar[]
Clock sysvar[SIGNER]
Vote authority
AuthorizeChecked(VoteAuthorize)
Authorize a key to send votes or issue a withdrawal
This instruction behaves like Authorize
with the additional requirement that the new vote
or withdraw authority must also be a signer.
§Account references
[WRITE]
Vote account to be updated with the Pubkey for authorization[]
Clock sysvar[SIGNER]
Vote or withdraw authority[SIGNER]
New vote or withdraw authority
UpdateVoteState(VoteStateUpdate)
Update the onchain vote state for the signer.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
UpdateVoteStateSwitch(VoteStateUpdate, Hash)
Update the onchain vote state for the signer along with a switching proof.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
AuthorizeWithSeed(VoteAuthorizeWithSeedArgs)
Given that the current Voter or Withdrawer authority is a derived key, this instruction allows someone who can sign for that derived key’s base key to authorize a new Voter or Withdrawer for a vote account.
§Account references
[Write]
Vote account to be updated[]
Clock sysvar[SIGNER]
Base key of current Voter or Withdrawer authority’s derived key
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs)
Given that the current Voter or Withdrawer authority is a derived key, this instruction allows someone who can sign for that derived key’s base key to authorize a new Voter or Withdrawer for a vote account.
This instruction behaves like AuthorizeWithSeed
with the additional requirement
that the new vote or withdraw authority must also be a signer.
§Account references
[Write]
Vote account to be updated[]
Clock sysvar[SIGNER]
Base key of current Voter or Withdrawer authority’s derived key[SIGNER]
New vote or withdraw authority
CompactUpdateVoteState(VoteStateUpdate)
Update the onchain vote state for the signer.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
CompactUpdateVoteStateSwitch(VoteStateUpdate, Hash)
Update the onchain vote state for the signer along with a switching proof.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
TowerSync(TowerSync)
Sync the onchain vote state with local tower
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
TowerSyncSwitch(TowerSync, Hash)
Sync the onchain vote state with local tower along with a switching proof
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
Implementations§
Source§impl VoteInstruction
impl VoteInstruction
pub fn is_simple_vote(&self) -> bool
pub fn is_single_vote_state_update(&self) -> bool
Sourcepub fn last_voted_slot(&self) -> Option<Slot>
pub fn last_voted_slot(&self) -> Option<Slot>
Only to be used on vote instructions (guard with is_simple_vote), panics otherwise
Sourcepub fn hash(&self) -> Hash
pub fn hash(&self) -> Hash
Only to be used on vote instructions (guard with is_simple_vote), panics otherwise
Sourcepub fn timestamp(&self) -> Option<UnixTimestamp>
pub fn timestamp(&self) -> Option<UnixTimestamp>
Only to be used on vote instructions (guard with is_simple_vote), panics otherwise
Trait Implementations§
Source§impl Clone for VoteInstruction
impl Clone for VoteInstruction
Source§fn clone(&self) -> VoteInstruction
fn clone(&self) -> VoteInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more