#[repr(C)]pub enum SinglePoolInstruction {
InitializePool,
ReactivatePoolStake,
DepositStake,
WithdrawStake {
user_stake_authority: Pubkey,
token_amount: u64,
},
CreateTokenMetadata,
UpdateTokenMetadata {
name: String,
symbol: String,
uri: String,
},
}Expand description
Instructions supported by the SinglePool program.
Variants§
InitializePool
Initialize the mint and stake account for a new single-validator
stake pool. The pool stake account must contain the rent-exempt
minimum plus the minimum delegation. No tokens will be minted: to
deposit more, use Deposit after InitializeStake.
[]Validator vote account[w]Pool account[w]Pool stake account[w]Pool token mint[]Pool stake authority[]Pool mint authority[]Rent sysvar[]Clock sysvar[]Stake history sysvar[]Stake config sysvar[]System program[]Token program[]Stake program
ReactivatePoolStake
Restake the pool stake account if it was deactivated. This can
happen through the stake program’s DeactivateDelinquent
instruction, or during a cluster restart.
[]Validator vote account[]Pool account[w]Pool stake account[]Pool stake authority[]Clock sysvar[]Stake history sysvar[]Stake config sysvar[]Stake program
DepositStake
Deposit stake into the pool. The output is a “pool” token representing fractional ownership of the pool stake. Inputs are converted to the current ratio.
[]Pool account[w]Pool stake account[w]Pool token mint[]Pool stake authority[]Pool mint authority[w]User stake account to join to the pool[w]User account to receive pool tokens[w]User account to receive lamports[]Clock sysvar[]Stake history sysvar[]Token program[]Stake program
WithdrawStake
Redeem tokens issued by this pool for stake at the current ratio.
[]Pool account[w]Pool stake account[w]Pool token mint[]Pool stake authority[]Pool mint authority[w]User stake account to receive stake at[w]User account to take pool tokens from[]Clock sysvar[]Token program[]Stake program
Fields
User authority for the new stake account
CreateTokenMetadata
Create token metadata for the stake-pool token in the metaplex-token program. Step three of the permissionless three-stage initialization flow. Note this instruction is not necessary for the pool to operate, to ensure we cannot be broken by upstream.
[]Pool account[]Pool token mint[]Pool mint authority[]Pool MPL authority[s, w]Payer for creation of token metadata account[w]Token metadata account[]Metadata program id[]System program id
UpdateTokenMetadata
Update token metadata for the stake-pool token in the metaplex-token program.
[]Validator vote account[]Pool account[]Pool MPL authority[s]Vote account authorized withdrawer[w]Token metadata account[]Metadata program id
Trait Implementations§
Source§impl BorshDeserialize for SinglePoolInstruction
impl BorshDeserialize for SinglePoolInstruction
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Clone for SinglePoolInstruction
impl Clone for SinglePoolInstruction
Source§fn clone(&self) -> SinglePoolInstruction
fn clone(&self) -> SinglePoolInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more