import { SPL_STAKE_POOL_PROGRAM_ADDRESS } from "../programs/splStakePool.js"; import "../programs/index.js"; import { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit"; //#region src/generated/instructions/withdrawStakeWithSlippage.d.ts export declare const WITHDRAW_STAKE_WITH_SLIPPAGE_DISCRIMINATOR = 24; export declare function getWithdrawStakeWithSlippageDiscriminatorBytes(): ReadonlyUint8Array; export type WithdrawStakeWithSlippageInstruction = string, TAccountValidatorList extends string | AccountMeta = string, TAccountWithdrawAuthority extends string | AccountMeta = string, TAccountSourceStakeAccount extends string | AccountMeta = string, TAccountDestinationStakeAccount extends string | AccountMeta = string, TAccountNewWithdrawAuthority extends string | AccountMeta = string, TAccountUserTransferAuthority extends string | AccountMeta = string, TAccountUserPoolTokenAccount extends string | AccountMeta = string, TAccountFeeAccount extends string | AccountMeta = string, TAccountPoolMint extends string | AccountMeta = string, TAccountClockSysvar extends string | AccountMeta = "SysvarC1ock11111111111111111111111111111111", TAccountTokenProgram extends string | AccountMeta = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountStakeProgram extends string | AccountMeta = "Stake11111111111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[TAccountStakePool extends string ? WritableAccount : TAccountStakePool, TAccountValidatorList extends string ? WritableAccount : TAccountValidatorList, TAccountWithdrawAuthority extends string ? ReadonlyAccount : TAccountWithdrawAuthority, TAccountSourceStakeAccount extends string ? WritableAccount : TAccountSourceStakeAccount, TAccountDestinationStakeAccount extends string ? WritableAccount : TAccountDestinationStakeAccount, TAccountNewWithdrawAuthority extends string ? ReadonlyAccount : TAccountNewWithdrawAuthority, TAccountUserTransferAuthority extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountUserTransferAuthority, TAccountUserPoolTokenAccount extends string ? WritableAccount : TAccountUserPoolTokenAccount, TAccountFeeAccount extends string ? WritableAccount : TAccountFeeAccount, TAccountPoolMint extends string ? WritableAccount : TAccountPoolMint, TAccountClockSysvar extends string ? ReadonlyAccount : TAccountClockSysvar, TAccountTokenProgram extends string ? ReadonlyAccount : TAccountTokenProgram, TAccountStakeProgram extends string ? ReadonlyAccount : TAccountStakeProgram, ...TRemainingAccounts]>; export type WithdrawStakeWithSlippageInstructionData = { discriminator: number; poolTokensIn: bigint; minimumLamportsOut: bigint; }; export type WithdrawStakeWithSlippageInstructionDataArgs = { poolTokensIn: number | bigint; minimumLamportsOut: number | bigint; }; export declare function getWithdrawStakeWithSlippageInstructionDataEncoder(): FixedSizeEncoder; export declare function getWithdrawStakeWithSlippageInstructionDataDecoder(): FixedSizeDecoder; export declare function getWithdrawStakeWithSlippageInstructionDataCodec(): FixedSizeCodec; export type WithdrawStakeWithSlippageAsyncInput = { stakePool: Address; validatorList: Address; withdrawAuthority?: Address; sourceStakeAccount: Address; destinationStakeAccount: Address; newWithdrawAuthority: Address; userTransferAuthority: TransactionSigner; userPoolTokenAccount: Address; feeAccount: Address; poolMint: Address; clockSysvar?: Address; tokenProgram?: Address; stakeProgram?: Address; poolTokensIn: WithdrawStakeWithSlippageInstructionDataArgs["poolTokensIn"]; minimumLamportsOut: WithdrawStakeWithSlippageInstructionDataArgs["minimumLamportsOut"]; }; /** * Withdraw the token from the pool at the current ratio, specifying a * minimum expected output lamport amount. * Succeeds if the stake account has enough SOL to cover the desired * amount of pool tokens, and if the withdrawal keeps the total * staked amount above the minimum of rent-exempt amount plus `max( * crate::MINIMUM_ACTIVE_STAKE, * solana_program::stake::tools::get_minimum_delegation() * )`. * 0. `[w]` Stake pool * 1. `[w]` Validator stake list storage account * 2. `[]` Stake pool withdraw authority * 3. `[w]` Validator or reserve stake account to split * 4. `[w]` Uninitialized stake account to receive withdrawal * 5. `[]` User account to set as a new withdraw authority * 6. `[s]` User transfer authority, for pool token account * 7. `[w]` User account with pool tokens to burn from * 8. `[w]` Account to receive pool fee tokens * 9. `[w]` Pool token mint account * 10. `[]` Sysvar clock account (required) * 11. `[]` Pool token program id * 12. `[]` Stake program id, * User data: amount of pool tokens to withdraw */ export declare function getWithdrawStakeWithSlippageInstructionAsync(input: WithdrawStakeWithSlippageAsyncInput, config?: { programAddress?: TProgramAddress; }): Promise>; export type WithdrawStakeWithSlippageInput = { stakePool: Address; validatorList: Address; withdrawAuthority: Address; sourceStakeAccount: Address; destinationStakeAccount: Address; newWithdrawAuthority: Address; userTransferAuthority: TransactionSigner; userPoolTokenAccount: Address; feeAccount: Address; poolMint: Address; clockSysvar?: Address; tokenProgram?: Address; stakeProgram?: Address; poolTokensIn: WithdrawStakeWithSlippageInstructionDataArgs["poolTokensIn"]; minimumLamportsOut: WithdrawStakeWithSlippageInstructionDataArgs["minimumLamportsOut"]; }; /** * Withdraw the token from the pool at the current ratio, specifying a * minimum expected output lamport amount. * Succeeds if the stake account has enough SOL to cover the desired * amount of pool tokens, and if the withdrawal keeps the total * staked amount above the minimum of rent-exempt amount plus `max( * crate::MINIMUM_ACTIVE_STAKE, * solana_program::stake::tools::get_minimum_delegation() * )`. * 0. `[w]` Stake pool * 1. `[w]` Validator stake list storage account * 2. `[]` Stake pool withdraw authority * 3. `[w]` Validator or reserve stake account to split * 4. `[w]` Uninitialized stake account to receive withdrawal * 5. `[]` User account to set as a new withdraw authority * 6. `[s]` User transfer authority, for pool token account * 7. `[w]` User account with pool tokens to burn from * 8. `[w]` Account to receive pool fee tokens * 9. `[w]` Pool token mint account * 10. `[]` Sysvar clock account (required) * 11. `[]` Pool token program id * 12. `[]` Stake program id, * User data: amount of pool tokens to withdraw */ export declare function getWithdrawStakeWithSlippageInstruction(input: WithdrawStakeWithSlippageInput, config?: { programAddress?: TProgramAddress; }): WithdrawStakeWithSlippageInstruction; export type ParsedWithdrawStakeWithSlippageInstruction = { programAddress: Address; accounts: { stakePool: TAccountMetas[0]; validatorList: TAccountMetas[1]; withdrawAuthority: TAccountMetas[2]; sourceStakeAccount: TAccountMetas[3]; destinationStakeAccount: TAccountMetas[4]; newWithdrawAuthority: TAccountMetas[5]; userTransferAuthority: TAccountMetas[6]; userPoolTokenAccount: TAccountMetas[7]; feeAccount: TAccountMetas[8]; poolMint: TAccountMetas[9]; clockSysvar: TAccountMetas[10]; tokenProgram: TAccountMetas[11]; stakeProgram: TAccountMetas[12]; }; data: WithdrawStakeWithSlippageInstructionData; }; export declare function parseWithdrawStakeWithSlippageInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedWithdrawStakeWithSlippageInstruction; //#endregion //# sourceMappingURL=withdrawStakeWithSlippage.d.ts.map