[−][src]Enum solana_stake_program::stake_instruction::StakeInstruction
Variants
Initialize(Authorized, Lockup)
Initialize
a stake with Lockup and Authorized information
Expects 2 Accounts: 0 - Uninitialized StakeAccount 1 - 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 requires Authorized::staker or Authorized::withdrawer signature, depending on which key's being updated
Expects 2 Accounts: 0 - StakeAccount to be updated with the Pubkey for authorization 1 - Clock sysvar Account that carries clock bank epoch
Delegate
a stake to a particular vote account
requires Authorized::staker signature
Expects 4 Accounts: 0 - Initialized StakeAccount to be delegated 1 - VoteAccount to which this Stake will be delegated 2 - Clock sysvar Account that carries clock bank epoch 3 - Config Account that carries stake config
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. Requires Authorized::staker signature and the signature of the split-off stake address.
The source stake must be either Initialized or a Stake.
Expects 2 Accounts: 0 - StakeAccount to be split 1 - Uninitialized StakeAcount that will take the split-off amount
Withdraw(u64)
Withdraw unstaked lamports from the stake account requires Authorized::withdrawer signature. If withdrawal is before lockup has expired, also requires signature of the lockup custodian.
Expects 4 Accounts: 0 - StakeAccount from which to withdraw 1 - Account to which the lamports will be transferred 2 - Syscall Account that carries epoch 3 - StakeHistory sysvar that carries stake warmup/cooldown history
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 requires Authorized::staker signature
Expects 2 Accounts: 0 - Delegate StakeAccount 1 - Syscall Account that carries epoch
SetLockup(LockupArgs)
Set stake lockup requires Lockup::custodian signature
Expects 1 Account: 0 - initialized StakeAccount
Trait Implementations
impl Clone for StakeInstruction
[src]
fn clone(&self) -> StakeInstruction
[src]
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
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.
fn to_owned(&self) -> T
[src]
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.
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>,