@@ -108,9 +108,8 @@ export type DepositSolStakePoolData = Pick<StakePoolData, 'poolMint' | 'reserveS
108108 * Construct Solana depositSol stake pool instruction from parameters.
109109 *
110110 * @param {DepositSolInstructionsParams } params - parameters for staking to stake pool
111- * @param poolMint - pool mint derived from getStakePoolAccount
112- * @param reserveStake - reserve account derived from getStakePoolAccount
113- * @param managerFeeAccount - manager fee account derived from getStakePoolAccount
111+ * @param {DepositSolStakePoolData } stakePool - data from getStakePoolAccount needed for DepositSol
112+ * @param createAssociatedTokenAccount
114113 * @returns {TransactionInstruction }
115114 */
116115export function depositSolInstructions (
@@ -219,13 +218,11 @@ export interface WithdrawStakeInstructionsParams {
219218export type WithdrawStakeStakePoolData = Pick < StakePoolData , 'poolMint' | 'validatorListAccount' | 'managerFeeAccount' > ;
220219
221220/**
222- * Construct Solana depositSol stake pool instruction from parameters.
221+ * Construct Solana withdrawStake stake pool instructions from parameters.
223222 *
224- * @param {DepositSolInstructionsParams } params - parameters for staking to stake pool
225- * @param poolMint - pool mint derived from getStakePoolAccount
226- * @param reserveStake - reserve account derived from getStakePoolAccount
227- * @param managerFeeAccount - manager fee account derived from getStakePoolAccount
228- * @returns {TransactionInstruction }
223+ * @param {WithdrawStakeInstructionsParams } params - parameters for unstaking from stake pool
224+ * @param {WithdrawStakeStakePoolData } stakePool - data from getStakePoolAccount needed for WithdrawStake
225+ * @returns {TransactionInstruction[] }
229226 */
230227export function withdrawStakeInstructions (
231228 params : WithdrawStakeInstructionsParams ,
@@ -271,6 +268,10 @@ export function withdrawStakeInstructions(
271268 poolTokens : Number ( poolAmount ) ,
272269 withdrawAuthority,
273270 } ) ,
271+ ...StakeProgram . deactivate ( {
272+ stakePubkey : destinationStakeAccount ,
273+ authorizedPubkey : tokenOwner ,
274+ } ) . instructions ,
274275 ] ;
275276}
276277
0 commit comments