Enum solana_stake_program::stake_instruction::StakeInstruction[][src]

pub enum StakeInstruction {
    Initialize(AuthorizedLockup),
    Authorize(PubkeyStakeAuthorize),
    DelegateStake,
    Split(u64),
    Withdraw(u64),
    Deactivate,
    SetLockup(LockupArgs),
    Merge,
    AuthorizeWithSeed(AuthorizeWithSeedArgs),
}

Variants

Initialize(AuthorizedLockup)

Initialize a stake with lockup and authorization information

Account references

  1. [WRITE] Uninitialized stake account
  2. [] Rent sysvar

Authorized carries pubkeys that must sign staker transactions and withdrawer transactions. Lockup carries information about withdrawal restrictions

Authorize(PubkeyStakeAuthorize)

Authorize a key to manage stake or withdrawal

Account references

  1. [WRITE] Stake account to be updated
  2. [] Clock sysvar
  3. [SIGNER] The stake or withdraw authority
  4. Optional: [SIGNER] Lockup authority, if updating StakeAuthorize::Withdrawer before lockup expiration
DelegateStake

Delegate a stake to a particular vote account

Account references

  1. [WRITE] Initialized stake account to be delegated
  2. [] Vote account to which this stake will be delegated
  3. [] Clock sysvar
  4. [] Stake history sysvar that carries stake warmup/cooldown history
  5. [] Address of config account that carries stake config
  6. [SIGNER] Stake authority

The entire balance of the staking account is staked. DelegateStake can be called multiple times, but re-delegation is delayed by one epoch

Split(u64)

Split u64 tokens and stake off a stake account into another stake account.

Account references

  1. [WRITE] Stake account to be split; must be in the Initialized or Stake state
  2. [WRITE] Uninitialized stake account that will take the split-off amount
  3. [SIGNER] Stake authority
Withdraw(u64)

Withdraw unstaked lamports from the stake account

Account references

  1. [WRITE] Stake account from which to withdraw
  2. [WRITE] Recipient account
  3. [] Clock sysvar
  4. [] Stake history sysvar that carries stake warmup/cooldown history
  5. [SIGNER] Withdraw authority
  6. Optional: [SIGNER] Lockup authority, if before lockup expiration

The u64 is the portion of the stake account balance to be withdrawn, must be <= StakeAccount.lamports - staked_lamports.

Deactivate

Deactivates the stake in the account

Account references

  1. [WRITE] Delegated stake account
  2. [] Clock sysvar
  3. [SIGNER] Stake authority
SetLockup(LockupArgs)

Set stake lockup

Account references

  1. [WRITE] Initialized stake account
  2. [SIGNER] Lockup authority
Merge

Merge two stake accounts.

Both accounts must have identical lockup and authority keys. A merge is possible between two stakes in the following states with no additional conditions:

For the following cases, the voter pubkey and vote credits observed must match:

All other combinations of stake states will fail to merge, including all “transient” states, where a stake is activating or deactivating with a non-zero effective stake.

Account references

  1. [WRITE] Destination stake account for the merge
  2. [WRITE] Source stake account for to merge. This account will be drained
  3. [] Clock sysvar
  4. [] Stake history sysvar that carries stake warmup/cooldown history
  5. [SIGNER] Stake authority
AuthorizeWithSeed(AuthorizeWithSeedArgs)

Authorize a key to manage stake or withdrawal with a derived key

Account references

  1. [WRITE] Stake account to be updated
  2. [SIGNER] Base key of stake or withdraw authority
  3. [] Clock sysvar
  4. Optional: [SIGNER] Lockup authority, if updating StakeAuthorize::Withdrawer before lockup expiration

Trait Implementations

impl Clone for StakeInstruction[src]

impl Debug for StakeInstruction[src]

impl<'de> Deserialize<'de> for StakeInstruction[src]

impl PartialEq<StakeInstruction> for StakeInstruction[src]

impl Serialize for StakeInstruction[src]

impl StructuralPartialEq for StakeInstruction[src]

Auto Trait Implementations

impl RefUnwindSafe for StakeInstruction

impl Send for StakeInstruction

impl Sync for StakeInstruction

impl Unpin for StakeInstruction

impl UnwindSafe for StakeInstruction

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]