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/decreaseValidatorStake.d.ts export declare const DECREASE_VALIDATOR_STAKE_DISCRIMINATOR = 3; export declare function getDecreaseValidatorStakeDiscriminatorBytes(): ReadonlyUint8Array; export type DecreaseValidatorStakeInstruction = string, TAccountStaker extends string | AccountMeta = string, TAccountWithdrawAuthority extends string | AccountMeta = string, TAccountValidatorList extends string | AccountMeta = string, TAccountStakeAccount extends string | AccountMeta = string, TAccountTransientStakeAccount extends string | AccountMeta = string, TAccountClockSysvar extends string | AccountMeta = "SysvarC1ock11111111111111111111111111111111", TAccountRentSysvar extends string | AccountMeta = "SysvarRent111111111111111111111111111111111", TAccountSystemProgram extends string | AccountMeta = "11111111111111111111111111111111", TAccountStakeProgram extends string | AccountMeta = "Stake11111111111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[TAccountStakePool extends string ? ReadonlyAccount : TAccountStakePool, TAccountStaker extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountStaker, TAccountWithdrawAuthority extends string ? ReadonlyAccount : TAccountWithdrawAuthority, TAccountValidatorList extends string ? WritableAccount : TAccountValidatorList, TAccountStakeAccount extends string ? WritableAccount : TAccountStakeAccount, TAccountTransientStakeAccount extends string ? WritableAccount : TAccountTransientStakeAccount, TAccountClockSysvar extends string ? ReadonlyAccount : TAccountClockSysvar, TAccountRentSysvar extends string ? ReadonlyAccount : TAccountRentSysvar, TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountStakeProgram extends string ? ReadonlyAccount : TAccountStakeProgram, ...TRemainingAccounts]>; export type DecreaseValidatorStakeInstructionData = { discriminator: number; lamports: bigint; transientStakeSeed: bigint; }; export type DecreaseValidatorStakeInstructionDataArgs = { lamports: number | bigint; transientStakeSeed: number | bigint; }; export declare function getDecreaseValidatorStakeInstructionDataEncoder(): FixedSizeEncoder; export declare function getDecreaseValidatorStakeInstructionDataDecoder(): FixedSizeDecoder; export declare function getDecreaseValidatorStakeInstructionDataCodec(): FixedSizeCodec; export type DecreaseValidatorStakeAsyncInput = { stakePool: Address; staker: TransactionSigner; withdrawAuthority?: Address; validatorList: Address; stakeAccount: Address; transientStakeAccount: Address; clockSysvar?: Address; rentSysvar?: Address; systemProgram?: Address; stakeProgram?: Address; lamports: DecreaseValidatorStakeInstructionDataArgs["lamports"]; transientStakeSeed: DecreaseValidatorStakeInstructionDataArgs["transientStakeSeed"]; }; /** * NOTE: This instruction has been deprecated since version 0.7.0. Please * use `DecreaseValidatorStakeWithReserve` instead. * (Staker only) Decrease active stake on a validator, eventually moving it * to the reserve * Internally, this instruction splits a validator stake account into its * corresponding transient stake account and deactivates it. * In order to rebalance the pool without taking custody, the staker needs * a way of reducing the stake on a stake account. This instruction splits * some amount of stake, up to the total activated stake, from the * canonical validator stake account, into its "transient" stake * account. * The instruction only succeeds if the transient stake account does not * exist. The amount of lamports to move must be at least rent-exemption * plus `max(crate::MINIMUM_ACTIVE_STAKE, * solana_program::stake::tools::get_minimum_delegation())`. * 0. `[]` Stake pool * 1. `[s]` Stake pool staker * 2. `[]` Stake pool withdraw authority * 3. `[w]` Validator list * 4. `[w]` Canonical stake account to split from * 5. `[w]` Transient stake account to receive split * 6. `[]` Clock sysvar * 7. `[]` Rent sysvar * 8. `[]` System program * 9. `[]` Stake program */ export declare function getDecreaseValidatorStakeInstructionAsync(input: DecreaseValidatorStakeAsyncInput, config?: { programAddress?: TProgramAddress; }): Promise>; export type DecreaseValidatorStakeInput = { stakePool: Address; staker: TransactionSigner; withdrawAuthority: Address; validatorList: Address; stakeAccount: Address; transientStakeAccount: Address; clockSysvar?: Address; rentSysvar?: Address; systemProgram?: Address; stakeProgram?: Address; lamports: DecreaseValidatorStakeInstructionDataArgs["lamports"]; transientStakeSeed: DecreaseValidatorStakeInstructionDataArgs["transientStakeSeed"]; }; /** * NOTE: This instruction has been deprecated since version 0.7.0. Please * use `DecreaseValidatorStakeWithReserve` instead. * (Staker only) Decrease active stake on a validator, eventually moving it * to the reserve * Internally, this instruction splits a validator stake account into its * corresponding transient stake account and deactivates it. * In order to rebalance the pool without taking custody, the staker needs * a way of reducing the stake on a stake account. This instruction splits * some amount of stake, up to the total activated stake, from the * canonical validator stake account, into its "transient" stake * account. * The instruction only succeeds if the transient stake account does not * exist. The amount of lamports to move must be at least rent-exemption * plus `max(crate::MINIMUM_ACTIVE_STAKE, * solana_program::stake::tools::get_minimum_delegation())`. * 0. `[]` Stake pool * 1. `[s]` Stake pool staker * 2. `[]` Stake pool withdraw authority * 3. `[w]` Validator list * 4. `[w]` Canonical stake account to split from * 5. `[w]` Transient stake account to receive split * 6. `[]` Clock sysvar * 7. `[]` Rent sysvar * 8. `[]` System program * 9. `[]` Stake program */ export declare function getDecreaseValidatorStakeInstruction(input: DecreaseValidatorStakeInput, config?: { programAddress?: TProgramAddress; }): DecreaseValidatorStakeInstruction; export type ParsedDecreaseValidatorStakeInstruction = { programAddress: Address; accounts: { stakePool: TAccountMetas[0]; staker: TAccountMetas[1]; withdrawAuthority: TAccountMetas[2]; validatorList: TAccountMetas[3]; stakeAccount: TAccountMetas[4]; transientStakeAccount: TAccountMetas[5]; clockSysvar: TAccountMetas[6]; rentSysvar: TAccountMetas[7]; systemProgram: TAccountMetas[8]; stakeProgram: TAccountMetas[9]; }; data: DecreaseValidatorStakeInstructionData; }; export declare function parseDecreaseValidatorStakeInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedDecreaseValidatorStakeInstruction; //#endregion //# sourceMappingURL=decreaseValidatorStake.d.ts.map