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/redelegate.d.ts export declare const REDELEGATE_DISCRIMINATOR = 22; export declare function getRedelegateDiscriminatorBytes(): ReadonlyUint8Array; export type RedelegateInstruction = string, TAccountStaker extends string | AccountMeta = string, TAccountWithdrawAuthority extends string | AccountMeta = string, TAccountValidatorList extends string | AccountMeta = string, TAccountReserveStake extends string | AccountMeta = string, TAccountSourceCanonicalStake extends string | AccountMeta = string, TAccountSourceTransientStake extends string | AccountMeta = string, TAccountEphemeralStake extends string | AccountMeta = string, TAccountDestinationTransientStake extends string | AccountMeta = string, TAccountDestinationStake extends string | AccountMeta = string, TAccountDestinationVote extends string | AccountMeta = string, TAccountClockSysvar extends string | AccountMeta = "SysvarC1ock11111111111111111111111111111111", TAccountStakeHistorySysvar extends string | AccountMeta = "SysvarStakeHistory1111111111111111111111111", TAccountStakeConfigSysvar extends string | AccountMeta = "StakeConfig11111111111111111111111111111111", 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, TAccountReserveStake extends string ? WritableAccount : TAccountReserveStake, TAccountSourceCanonicalStake extends string ? WritableAccount : TAccountSourceCanonicalStake, TAccountSourceTransientStake extends string ? WritableAccount : TAccountSourceTransientStake, TAccountEphemeralStake extends string ? WritableAccount : TAccountEphemeralStake, TAccountDestinationTransientStake extends string ? WritableAccount : TAccountDestinationTransientStake, TAccountDestinationStake extends string ? ReadonlyAccount : TAccountDestinationStake, TAccountDestinationVote extends string ? ReadonlyAccount : TAccountDestinationVote, TAccountClockSysvar extends string ? ReadonlyAccount : TAccountClockSysvar, TAccountStakeHistorySysvar extends string ? ReadonlyAccount : TAccountStakeHistorySysvar, TAccountStakeConfigSysvar extends string ? ReadonlyAccount : TAccountStakeConfigSysvar, TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountStakeProgram extends string ? ReadonlyAccount : TAccountStakeProgram, ...TRemainingAccounts]>; export type RedelegateInstructionData = { discriminator: number; lamports: bigint; sourceTransientStakeSeed: bigint; ephemeralStakeSeed: bigint; destinationTransientStakeSeed: bigint; }; export type RedelegateInstructionDataArgs = { lamports: number | bigint; sourceTransientStakeSeed: number | bigint; ephemeralStakeSeed: number | bigint; destinationTransientStakeSeed: number | bigint; }; export declare function getRedelegateInstructionDataEncoder(): FixedSizeEncoder; export declare function getRedelegateInstructionDataDecoder(): FixedSizeDecoder; export declare function getRedelegateInstructionDataCodec(): FixedSizeCodec; export type RedelegateAsyncInput = { stakePool: Address; staker: TransactionSigner; withdrawAuthority?: Address; validatorList: Address; reserveStake: Address; sourceCanonicalStake: Address; sourceTransientStake: Address; ephemeralStake: Address; destinationTransientStake: Address; destinationStake: Address; destinationVote: Address; clockSysvar?: Address; stakeHistorySysvar?: Address; stakeConfigSysvar?: Address; systemProgram?: Address; stakeProgram?: Address; lamports: RedelegateInstructionDataArgs["lamports"]; sourceTransientStakeSeed: RedelegateInstructionDataArgs["sourceTransientStakeSeed"]; ephemeralStakeSeed: RedelegateInstructionDataArgs["ephemeralStakeSeed"]; destinationTransientStakeSeed: RedelegateInstructionDataArgs["destinationTransientStakeSeed"]; }; /** * (Staker only) Redelegate active stake on a validator, eventually moving * it to another * Internally, this instruction splits a validator stake account into its * corresponding transient stake account, redelegates it to an ephemeral * stake account, then merges that stake into the destination transient * stake account. * 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 source transient stake account and * ephemeral stake account do not exist. * The amount of lamports to move must be at least rent-exemption plus the * minimum delegation amount. Rent-exemption plus minimum delegation * is required for the destination ephemeral stake account. * The rent-exemption for the source transient account comes from the stake * pool reserve, if needed. * The amount that arrives at the destination validator in the end is * `redelegate_lamports - rent_exemption` if the destination transient * account does *not* exist, and `redelegate_lamports` if the destination * transient account already exists. The `rent_exemption` is not activated * when creating the destination transient stake account, but if it already * exists, then the full amount is delegated. * 0. `[]` Stake pool * 1. `[s]` Stake pool staker * 2. `[]` Stake pool withdraw authority * 3. `[w]` Validator list * 4. `[w]` Reserve stake account, to withdraw rent exempt reserve * 5. `[w]` Source canonical stake account to split from * 6. `[w]` Source transient stake account to receive split and be * redelegated * 7. `[w]` Uninitialized ephemeral stake account to receive redelegation * 8. `[w]` Destination transient stake account to receive ephemeral stake * by merge * 9. `[]` Destination stake account to receive transient stake after * activation * 10. `[]` Destination validator vote account * 11. `[]` Clock sysvar * 12. `[]` Stake History sysvar * 13. `[]` Stake Config sysvar * 14. `[]` System program * 15. `[]` Stake program */ export declare function getRedelegateInstructionAsync(input: RedelegateAsyncInput, config?: { programAddress?: TProgramAddress; }): Promise>; export type RedelegateInput = { stakePool: Address; staker: TransactionSigner; withdrawAuthority: Address; validatorList: Address; reserveStake: Address; sourceCanonicalStake: Address; sourceTransientStake: Address; ephemeralStake: Address; destinationTransientStake: Address; destinationStake: Address; destinationVote: Address; clockSysvar?: Address; stakeHistorySysvar?: Address; stakeConfigSysvar?: Address; systemProgram?: Address; stakeProgram?: Address; lamports: RedelegateInstructionDataArgs["lamports"]; sourceTransientStakeSeed: RedelegateInstructionDataArgs["sourceTransientStakeSeed"]; ephemeralStakeSeed: RedelegateInstructionDataArgs["ephemeralStakeSeed"]; destinationTransientStakeSeed: RedelegateInstructionDataArgs["destinationTransientStakeSeed"]; }; /** * (Staker only) Redelegate active stake on a validator, eventually moving * it to another * Internally, this instruction splits a validator stake account into its * corresponding transient stake account, redelegates it to an ephemeral * stake account, then merges that stake into the destination transient * stake account. * 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 source transient stake account and * ephemeral stake account do not exist. * The amount of lamports to move must be at least rent-exemption plus the * minimum delegation amount. Rent-exemption plus minimum delegation * is required for the destination ephemeral stake account. * The rent-exemption for the source transient account comes from the stake * pool reserve, if needed. * The amount that arrives at the destination validator in the end is * `redelegate_lamports - rent_exemption` if the destination transient * account does *not* exist, and `redelegate_lamports` if the destination * transient account already exists. The `rent_exemption` is not activated * when creating the destination transient stake account, but if it already * exists, then the full amount is delegated. * 0. `[]` Stake pool * 1. `[s]` Stake pool staker * 2. `[]` Stake pool withdraw authority * 3. `[w]` Validator list * 4. `[w]` Reserve stake account, to withdraw rent exempt reserve * 5. `[w]` Source canonical stake account to split from * 6. `[w]` Source transient stake account to receive split and be * redelegated * 7. `[w]` Uninitialized ephemeral stake account to receive redelegation * 8. `[w]` Destination transient stake account to receive ephemeral stake * by merge * 9. `[]` Destination stake account to receive transient stake after * activation * 10. `[]` Destination validator vote account * 11. `[]` Clock sysvar * 12. `[]` Stake History sysvar * 13. `[]` Stake Config sysvar * 14. `[]` System program * 15. `[]` Stake program */ export declare function getRedelegateInstruction(input: RedelegateInput, config?: { programAddress?: TProgramAddress; }): RedelegateInstruction; export type ParsedRedelegateInstruction = { programAddress: Address; accounts: { stakePool: TAccountMetas[0]; staker: TAccountMetas[1]; withdrawAuthority: TAccountMetas[2]; validatorList: TAccountMetas[3]; reserveStake: TAccountMetas[4]; sourceCanonicalStake: TAccountMetas[5]; sourceTransientStake: TAccountMetas[6]; ephemeralStake: TAccountMetas[7]; destinationTransientStake: TAccountMetas[8]; destinationStake: TAccountMetas[9]; destinationVote: TAccountMetas[10]; clockSysvar: TAccountMetas[11]; stakeHistorySysvar: TAccountMetas[12]; stakeConfigSysvar: TAccountMetas[13]; systemProgram: TAccountMetas[14]; stakeProgram: TAccountMetas[15]; }; data: RedelegateInstructionData; }; export declare function parseRedelegateInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedRedelegateInstruction; //#endregion //# sourceMappingURL=redelegate.d.ts.map