Total number of droplets paid by the user in deposit fees,
including referralFeePaid
Number of droplets (1 / 10 ** 9 scnSOL) the user should receive in return for the deposit, with deposit fees deducted
Number of lamports that was staked/deposited
Number of droplets paid by the user in referral fees.
This is a part of dropletsFeePaid
, i.e.
deposit fee paid to socean = dropletsFeePaid
- referralFeePaid
Array of transaction arrays where all transactions in the inner array must be confirmed before proceeding to the next inner array
Array of string arrays where each element corresponds to a transaction in a TransactionSequence
A withdrawal receipt for a single stake account in the stake pool
The stake account to make this withdrawal from. Can be a validator stake account, transient stake account, or the pool's reserve stake account.
The calculated withdrawal receipt for this stake account
Breakdown of a single withdrawal from a single stake account in the stake pool
Calculates and returns the expected amount of droplets (1 / 10 ** 9 scnSOL) to be received by the user for staking SOL, with deposit fees factored in. Note: if an epoch boundary crosses and the stake pool is updated, the scnSOL supply will no longer match and the result of this function will be incorrect
amount of SOL to be staked, in lamports
the stake pool to stake to
the amount of droplets (1 / 10 ** 9 scnSOL) to be received by the user
Calculates and returns the expected amount of droplets (1 / 10 ** 9 scnSOL) to be received by the user for staking stake account(s), with deposit fees factored in. Note: if an epoch boundary crosses and the stake pool is updated, the scnSOL supply will no longer match and the result of this function will be incorrect
SOL value of the stake accounts to be staked, in lamports
the stake pool to stake to
the amount of droplets (1 / 10 ** 9 scnSOL) to be received by the user
Calculates the withdrawal procedure - how many lamports to split and withdraw from each validator stake account given a desired number of droplets to withdraw.
the stake pool account
Initializes a DepositSol stake pool instruction given the required accounts and data
Initializes a DepositStake stake pool instruction given the required accounts and data
This instruction assumes that the depositStakeAddress
stake account's withdraw and deposit
authority has already been set to stakePoolDepositAuthority
.
To use this in a transaction, prefix this instruction with two StakeProgram.authorize
instructions
to change the stake account's authorities to stakePoolDepositAuthority
.
Signs and sends TransactionSequence
,
awaiting confirmations for each inner array of transactions
before proceeding to the next one
wallet signing the transaction
TransactionSequence
to sign and send
solana connection
transaction confirm options for each transaction
TransactionSequenceSignatures
for all transactions in the TransactionSequence
Sums up the total number of droplets unstaked
given an array of ValidatorWithdrawalReceipt
s
Sums up the total number of lamports withdrawn
given an array of ValidatorWithdrawalReceipt
s
Sums up the total number of droplets (1 / 10 ** 9 scnSOL) paid
in withdrawal fees given an array of ValidatorWithdrawalReceipt
s
Creates a transaction with a single UpdateValidatorListBalance instruction Since UpdateValidatorListBalance must be the sole instruction of any transaction, (there's a vulnerability if it isn't) we don't export the instruction directly, only a containing transaction
The stake pool prog
Initializes a WithdrawStake stake pool instruction given the required accounts and data
Generated using TypeDoc
Breakdown of a single deposit into the stake pool