Enum solana_stake_program::stake_instruction::StakeInstruction [−][src]
Variants
Initialize(Authorized, Lockup)
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)
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
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)
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)
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
.
Deactivates the stake in the account
Account references
- [WRITE] Delegated stake account
- [] Clock sysvar
- [SIGNER] Stake authority
SetLockup(LockupArgs)
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)
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]
fn clone(&self) -> StakeInstruction
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StakeInstruction
[src]
impl<'de> Deserialize<'de> for StakeInstruction
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<StakeInstruction> for StakeInstruction
[src]
fn eq(&self, other: &StakeInstruction) -> bool
[src]
fn ne(&self, other: &StakeInstruction) -> bool
[src]
impl Serialize for StakeInstruction
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,