import { PreferredValidatorType, PreferredValidatorTypeArgs } from "../types/preferredValidatorType.js"; import "../types/index.js"; import { SPL_STAKE_POOL_PROGRAM_ADDRESS } from "../programs/splStakePool.js"; import "../programs/index.js"; import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, Option, OptionOrNullable, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit"; //#region src/generated/instructions/setPreferredValidator.d.ts export declare const SET_PREFERRED_VALIDATOR_DISCRIMINATOR = 5; export declare function getSetPreferredValidatorDiscriminatorBytes(): ReadonlyUint8Array; export type SetPreferredValidatorInstruction = string, TAccountStaker extends string | AccountMeta = string, TAccountValidatorList extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[TAccountStakePool extends string ? WritableAccount : TAccountStakePool, TAccountStaker extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountStaker, TAccountValidatorList extends string ? ReadonlyAccount : TAccountValidatorList, ...TRemainingAccounts]>; export type SetPreferredValidatorInstructionData = { discriminator: number; validatorType: PreferredValidatorType; validatorVoteAddress: Option
; }; export type SetPreferredValidatorInstructionDataArgs = { validatorType: PreferredValidatorTypeArgs; validatorVoteAddress: OptionOrNullable
; }; export declare function getSetPreferredValidatorInstructionDataEncoder(): Encoder; export declare function getSetPreferredValidatorInstructionDataDecoder(): Decoder; export declare function getSetPreferredValidatorInstructionDataCodec(): Codec; export type SetPreferredValidatorInput = { stakePool: Address; staker: TransactionSigner; validatorList: Address; validatorType: SetPreferredValidatorInstructionDataArgs["validatorType"]; validatorVoteAddress: SetPreferredValidatorInstructionDataArgs["validatorVoteAddress"]; }; /** * (Staker only) Set the preferred deposit or withdraw stake account for * the stake pool * In order to avoid users abusing the stake pool as a free conversion * between SOL staked on different validators, the staker can force all * deposits and/or withdraws to go to one chosen account, or unset that * account. * 0. `[w]` Stake pool * 1. `[s]` Stake pool staker * 2. `[]` Validator list * Fails if the validator is not part of the stake pool. */ export declare function getSetPreferredValidatorInstruction(input: SetPreferredValidatorInput, config?: { programAddress?: TProgramAddress; }): SetPreferredValidatorInstruction; export type ParsedSetPreferredValidatorInstruction = { programAddress: Address; accounts: { stakePool: TAccountMetas[0]; staker: TAccountMetas[1]; validatorList: TAccountMetas[2]; }; data: SetPreferredValidatorInstructionData; }; export declare function parseSetPreferredValidatorInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedSetPreferredValidatorInstruction; //#endregion //# sourceMappingURL=setPreferredValidator.d.ts.map