Enum spl_stake_pool::stake_program::StakeInstruction[][src]

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

FIXME copied from solana stake program

Variants

Initialize(AuthorizedLockup)
Expand description

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)
Expand description

Authorize a key to manage stake or withdrawal

Account references

  1. [WRITE] Stake account to be updated
  2. [] (reserved for future use) Clock sysvar
  3. [SIGNER] The stake or withdraw authority
DelegateStake
Expand description

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)
Expand description

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)
Expand description

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 <= ValidatorStakeAccount.lamports - staked_lamports.

Deactivate
Expand description

Deactivates the stake in the account

Account references

  1. [WRITE] Delegated stake account
  2. [] Clock sysvar
  3. [SIGNER] Stake authority
SetLockup
Expand description

Set stake lockup

Account references

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

Merge two stake accounts. Both accounts must be deactivated and have identical lockup and authority keys.

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
Expand description

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

Trait Implementations

impl Clone for StakeInstruction[src]

fn clone(&self) -> StakeInstruction[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for StakeInstruction[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl PartialEq<StakeInstruction> for StakeInstruction[src]

fn eq(&self, other: &StakeInstruction) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &StakeInstruction) -> bool[src]

This method tests for !=.

impl Serialize for StakeInstruction[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl StructuralPartialEq for StakeInstruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> AbiEnumVisitor for T where
    T: Serialize + ?Sized

pub default fn visit_for_abi(
    &self,
    _digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>

impl<T> AbiEnumVisitor for T where
    T: Serialize + AbiExample + ?Sized

pub default fn visit_for_abi(
    &self,
    digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>

impl<T> AbiExample for T

pub default fn example() -> T

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

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.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

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