#[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
Fields
User authority for the new stake account
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
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
Fields
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 SinglePoolInstructionwhere
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
String: BorshDeserialize,
impl BorshDeserialize for SinglePoolInstructionwhere Pubkey: BorshDeserialize, u64: BorshDeserialize, String: BorshDeserialize,
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 BorshSerialize for SinglePoolInstructionwhere
Pubkey: BorshSerialize,
u64: BorshSerialize,
String: BorshSerialize,
impl BorshSerialize for SinglePoolInstructionwhere Pubkey: BorshSerialize, u64: BorshSerialize, String: BorshSerialize,
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 moresource§impl Debug for SinglePoolInstruction
impl Debug for SinglePoolInstruction
source§impl EnumExt for SinglePoolInstructionwhere
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
String: BorshDeserialize,
impl EnumExt for SinglePoolInstructionwhere Pubkey: BorshDeserialize, u64: BorshDeserialize, String: BorshDeserialize,
source§impl PartialEq for SinglePoolInstruction
impl PartialEq for SinglePoolInstruction
source§fn eq(&self, other: &SinglePoolInstruction) -> bool
fn eq(&self, other: &SinglePoolInstruction) -> bool
self and other values to be equal, and is used
by ==.