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.Stake

Client for the Stake program. Instruction data is bincode-encoded (u32 little-endian discriminant), like the System Program. Covered discriminants: 0-7, 9, 10, 13; the seed-authority variants (8, 11), SetLockupChecked (12), DeactivateDelinquent (14) and the deprecated Redelegate (15) are not modeled.

  • 8 types
  • 17 values
datadata Authorized
#

The authorities of a stake account.

Instances5Eq, Show, Generic, Binary, Rep
datadata Lockup
#

Lockup constraints on a stake account.

Instances5Eq, Show, Generic, Binary, Rep
datadata StakeAuthorize
#

Which stake authority an operation concerns (bincode u32: 0 staker, 1 withdrawer).

Instances6Bounded, Enum, Eq, Show, Generic, Rep
datadata LockupArgs
#

Partial lockup update; bincode Option fields (u8 tag + value).

Instances5Eq, Show, Generic, Binary, Rep
datadata StakeInstruction
#
Instances5Eq, Show, Generic, Binary, Rep

Creates instruction to "Initialize a stake with lockup and authorization information" Receives the new stake account, the authorized staker/withdrawer and the lockup. # Account references 0. `[WRITE]` Uninitialized stake account 1. `[]` Rent sysvar

Creates instruction to "Authorize a key to manage stake or withdrawal" Receives the stake account, the current stake or withdraw authority, the new authority, which authority is being changed and, if updating the withdrawer before lockup expiration, the lockup custodian. # Account references 0. `[WRITE]` Stake account to be updated 1. `[]` Clock sysvar 2. `[SIGNER]` The stake or withdraw authority 3. `[SIGNER]` (optional) Lockup authority, if updating StakeAuthorize::Withdrawer before lockup expiration

Creates instruction to "Delegate a stake to a particular vote account" Receives the stake account, the authorized staker and the vote account. # Account references 0. `[WRITE]` Initialized stake account to be delegated 1. `[]` Vote account to which this stake will be delegated 2. `[]` Clock sysvar 3. `[]` Stake history sysvar 4. `[]` Address of config account that carries stake config 5. `[SIGNER]` Stake authority

Creates instruction to "Split u64 tokens and stake off a stake account into another stake account" Receives the stake account to split from, the uninitialized stake account that will take the split-off amount, the stake authority and the number of lamports to split. The destination account must already be allocated with 200 bytes and assigned to the stake program (compose with the System Program client's createAccount/allocate+assign); the Rust SDK's composite split helper emits those instructions automatically, this builder does not. # Account references 0. `[WRITE]` Stake account to be split; must be in the Initialized or Stake state 1. `[WRITE]` Uninitialized stake account that will take the split-off amount 2. `[SIGNER]` Stake authority

Creates instruction to "Withdraw unstaked lamports from the stake account" Receives the stake account, the recipient account, the withdraw authority, the number of lamports to withdraw and, if withdrawing before lockup expiration, the lockup custodian. # Account references 0. `[WRITE]` Stake account from which to withdraw 1. `[WRITE]` Recipient account 2. `[]` Clock sysvar 3. `[]` Stake history sysvar 4. `[SIGNER]` Withdraw authority 5. `[SIGNER]` (optional) Lockup authority, if before lockup expiration

Creates instruction to "Deactivate the stake in the account" Receives the stake account and the stake authority. # Account references 0. `[WRITE]` Delegated stake account 1. `[]` Clock sysvar 2. `[SIGNER]` Stake authority

Creates instruction to "Set stake lockup" Receives the stake account, the lockup fields to update, and the lockup custodian (or, if no lockup is currently in force, the withdraw authority). # Account references 0. `[WRITE]` Stake account 1. `[SIGNER]` Lockup authority or withdraw authority

Creates instruction to "Merge two stake accounts" Receives the destination stake account, the source stake account (which is merged into the destination and deactivated) and the stake authority. # Account references 0. `[WRITE]` Destination stake account for the merge 1. `[WRITE]` Source stake account for the merge 2. `[]` Clock sysvar 3. `[]` Stake history sysvar 4. `[SIGNER]` Stake authority

Creates instruction to "Initialize a stake with authorization information", checking that the withdrawer signs (a safer version of initialize). Receives the new stake account and the authorized staker/withdrawer; the withdrawer must sign. # Account references 0. `[WRITE]` Uninitialized stake account 1. `[]` Rent sysvar 2. `[]` The stake authority 3. `[SIGNER]` The withdraw authority

Creates instruction to "Authorize a key to manage stake or withdrawal", checking that the new authority signs (a safer version of authorize). Receives the stake account, the current stake or withdraw authority, the new authority (which must sign), which authority is being changed and, if updating the withdrawer before lockup expiration, the lockup custodian. # Account references 0. `[WRITE]` Stake account to be updated 1. `[]` Clock sysvar 2. `[SIGNER]` The stake or withdraw authority 3. `[SIGNER]` The new stake or withdraw authority 4. `[SIGNER]` (optional) Lockup authority, if updating StakeAuthorize::Withdrawer before lockup expiration