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<u64>
pub fn last_voted_slot(&self) -> Option<u64>
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 moreSource§impl Debug for VoteInstruction
impl Debug for VoteInstruction
Source§impl<'de> Deserialize<'de> for VoteInstruction
impl<'de> Deserialize<'de> for VoteInstruction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoteInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoteInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for VoteInstruction
impl PartialEq for VoteInstruction
Source§impl Serialize for VoteInstruction
impl Serialize for VoteInstruction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for VoteInstruction
impl StructuralPartialEq for VoteInstruction
Auto Trait Implementations§
impl Freeze for VoteInstruction
impl RefUnwindSafe for VoteInstruction
impl Send for VoteInstruction
impl Sync for VoteInstruction
impl Unpin for VoteInstruction
impl UnwindSafe for VoteInstruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more