Enum solana_stake_program::stake_instruction::StakeInstruction [−][src]
pub enum StakeInstruction { Initialize(Authorized, Lockup), Authorize(Pubkey, StakeAuthorize), DelegateStake, Split(u64), Withdraw(u64), Deactivate, SetLockup(LockupArgs), Merge, AuthorizeWithSeed(AuthorizeWithSeedArgs), }
Variants
Initialize(Authorized, Lockup)
Expand description
Initialize a stake with lockup and authorization information
Account references
- [WRITE] Uninitialized stake account
- [] Rent sysvar
Authorized carries pubkeys that must sign staker transactions and withdrawer transactions. Lockup carries information about withdrawal restrictions
Authorize(Pubkey, StakeAuthorize)
Expand description
Authorize a key to manage stake or withdrawal
Account references
- [WRITE] Stake account to be updated
- [] Clock sysvar
- [SIGNER] The stake or withdraw authority
- Optional: [SIGNER] Lockup authority, if updating StakeAuthorize::Withdrawer before lockup expiration
Expand description
Delegate a stake to a particular vote account
Account references
- [WRITE] Initialized stake account to be delegated
- [] Vote account to which this stake will be delegated
- [] Clock sysvar
- [] Stake history sysvar that carries stake warmup/cooldown history
- [] Address of config account that carries stake config
- [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
- [WRITE] Stake account to be split; must be in the Initialized or Stake state
- [WRITE] Uninitialized stake account that will take the split-off amount
- [SIGNER] Stake authority
Withdraw(u64)
Expand description
Withdraw unstaked lamports from the stake account
Account references
- [WRITE] Stake account from which to withdraw
- [WRITE] Recipient account
- [] Clock sysvar
- [] Stake history sysvar that carries stake warmup/cooldown history
- [SIGNER] Withdraw authority
- 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
.
Expand description
Deactivates the stake in the account
Account references
- [WRITE] Delegated stake account
- [] Clock sysvar
- [SIGNER] Stake authority
SetLockup(LockupArgs)
Expand description
Expand description
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:
- two deactivated stakes
- an inactive stake into an activating stake during its activation epoch
For the following cases, the voter pubkey and vote credits observed must match:
- two activated stakes
- two activating accounts that share an activation epoch, during the activation epoch
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
- [WRITE] Destination stake account for the merge
- [WRITE] Source stake account for to merge. This account will be drained
- [] Clock sysvar
- [] Stake history sysvar that carries stake warmup/cooldown history
- [SIGNER] Stake authority
AuthorizeWithSeed(AuthorizeWithSeedArgs)
Expand description
Authorize a key to manage stake or withdrawal with a derived key
Account references
- [WRITE] Stake account to be updated
- [SIGNER] Base key of stake or withdraw authority
- [] Clock sysvar
- Optional: [SIGNER] Lockup authority, if updating StakeAuthorize::Withdrawer before lockup expiration
Trait Implementations
impl Clone for StakeInstruction
[src]
impl Clone for StakeInstruction
[src]fn clone(&self) -> 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]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for StakeInstruction
[src]
impl Debug for StakeInstruction
[src]impl<'de> Deserialize<'de> for StakeInstruction
[src]
impl<'de> Deserialize<'de> for StakeInstruction
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[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]
impl PartialEq<StakeInstruction> for StakeInstruction
[src]fn eq(&self, other: &StakeInstruction) -> bool
[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]
fn ne(&self, other: &StakeInstruction) -> bool
[src]This method tests for !=
.
impl Serialize 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> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
[src]
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
[src]pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
[src]
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
[src]pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
[src]
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
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]
T: for<'de> Deserialize<'de>,