HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulesolana-haskell-sdk-1.3.0.0GHC2021

Network.Solana.NativePrograms.Vote

Client for the Vote program. Instruction data is bincode-encoded (u32 little-endian discriminant), like the System and Stake programs. Covered discriminants: 0, 1, 3, 4, 5, 7 (account-management surface); the consensus Vote instruction (2) and the remaining vote-state variants (6, 8-15) are not modeled.

  • 3 types
  • 9 values
datadata VoteInit
#
Instances5Eq, Show, Generic, Binary, Rep
datadata VoteAuthorize
#

Which vote authority an operation concerns (bincode u32: 0 voter, 1 withdrawer).

Instances6Bounded, Enum, Eq, Show, Generic, Rep
datadata VoteInstruction
#
Instances5Eq, Show, Generic, Binary, Rep

Creates instruction to "Initialize a vote account" Receives the new vote account and the initialization arguments (node identity, authorized voter/withdrawer and commission). # Account references 0. `[WRITE]` Uninitialized vote account 1. `[]` Rent sysvar 2. `[]` Clock sysvar 3. `[SIGNER]` New validator identity (node)

Creates instruction to "Authorize a key to send votes or issue a withdrawal" Receives the vote account, the current authority, the new authority and which authority is being changed. # Account references 0. `[WRITE]` Vote account to be updated 1. `[]` Clock sysvar 2. `[SIGNER]` The vote or withdraw authority

Creates instruction to "Withdraw lamports from a vote account" Receives the vote account, the recipient account, the withdraw authority and the number of lamports to withdraw. # Account references 0. `[WRITE]` Vote account to withdraw from 1. `[WRITE]` Recipient account 2. `[SIGNER]` Withdraw authority

Creates instruction to "Update the vote account's validator identity (node pubkey)" Receives the vote account, the new validator identity (which must sign) and the withdraw authority. # Account references 0. `[WRITE]` Vote account to be updated 1. `[SIGNER]` New validator identity (node) 2. `[SIGNER]` Withdraw authority

Creates instruction to "Update the vote account's commission" Receives the vote account, the withdraw authority and the new commission. # Account references 0. `[WRITE]` Vote account to be updated 1. `[SIGNER]` Withdraw authority

Creates instruction to "Authorize a key to send votes or issue a withdrawal", checking that the new authority signs (a safer version of authorizeVote). Receives the vote account, the current authority, the new authority (which must sign) and which authority is being changed. # Account references 0. `[WRITE]` Vote account to be updated 1. `[]` Clock sysvar 2. `[SIGNER]` The vote or withdraw authority 3. `[SIGNER]` The new vote or withdraw authority