Skip to main content

Module instruction

Module instruction 

Source
Expand description

Instruction types

Enums§

SinglePoolInstruction
Instructions supported by the SinglePool program.

Functions§

create_pool_onramp
Creates a InitializePoolOnRamp instruction plus the transfer to fund it. This is for convenience, for users who need to create an on-ramp for existing pools. We don’t use it internally, because initialize() carries the necessary logic.
create_token_metadata
Creates a CreateTokenMetadata instruction.
deposit
Creates all necessary instructions to deposit stake.
deposit_liquid
Creates the necessary instructions to deposit liquid sol. escrow_deposit_account should be the pubkey of an unused keypair. This avoids passing a wallet signature into an opaque program, a best practice for safety given its untrammeled authority. The escrow account does not have to meet rent exemption because it is opened and closed in the span of one transaction.
deposit_sol
Creates a DepositSol instruction. It is recommended as a matter of hygiene to use the deposit_liquid() helper, to isolate user wallet signing authority from the program.
deposit_stake
Creates a DepositStake instruction.
initialize
Creates all necessary instructions to initialize the stake pool.
initialize_pool
Creates an InitializePool instruction.
initialize_pool_onramp
Creates a InitializePoolOnRamp instruction.
replenish_pool
Creates a ReplenishPool instruction.
update_token_metadata
Creates an UpdateTokenMetadata instruction.
withdraw
Creates all necessary instructions to withdraw stake into a given stake account. If a new stake account is required, the user should first include system_instruction::create_account with account size stake::state::StakeStateV2::size_of() and owner stake::program::id().
withdraw_stake
Creates a WithdrawStake instruction.