diff --git a/src/types/decoded-data.ts b/src/types/decoded-data.ts index 228e1216..7f3f82e8 100644 --- a/src/types/decoded-data.ts +++ b/src/types/decoded-data.ts @@ -6,6 +6,7 @@ export enum ConfirmationViewTypes { COW_SWAP_ORDER = 'COW_SWAP_ORDER', COW_SWAP_TWAP_ORDER = 'COW_SWAP_TWAP_ORDER', KILN_NATIVE_STAKING_DEPOSIT = 'KILN_NATIVE_STAKING_DEPOSIT', + KILN_NATIVE_STAKING_VALIDATORS_EXIT = 'KILN_NATIVE_STAKING_VALIDATORS_EXIT', } export type DecodedDataRequest = { @@ -69,6 +70,13 @@ export enum NativeStakingStatus { UNKNOWN = 'UNKNOWN', } +export enum NativeStakingExitStatus { + AWAITING_EXECUTION = 'AWAITING_EXECUTION', + READY_TO_WITHDRAW = 'READY_TO_WITHDRAW', + REQUEST_PENDING = 'REQUEST_PENDING', + SIGNATURE_NEEDED = 'SIGNATURE_NEEDED', +} + /* Staking */ export type NativeStakingDepositConfirmationView = { type: ConfirmationViewTypes.KILN_NATIVE_STAKING_DEPOSIT @@ -88,9 +96,24 @@ export type NativeStakingDepositConfirmationView = { numValidators: number } & DecodedDataResponse +export type NativeStakingValidatorsExitConfirmationView = { + type: ConfirmationViewTypes.KILN_NATIVE_STAKING_VALIDATORS_EXIT + status: NativeStakingExitStatus + estimatedExitTime: number + estimatedWithdrawalTime: number + value: string + numValidators: number + tokenInfo: TokenInfo +} & DecodedDataResponse + +export type AnyStakingConfirmationView = + | NativeStakingDepositConfirmationView + | NativeStakingValidatorsExitConfirmationView + /* Union */ export type AnyConfirmationView = | BaselineConfirmationView | SwapOrderConfirmationView | TwapOrderConfirmationView | NativeStakingDepositConfirmationView + | NativeStakingValidatorsExitConfirmationView diff --git a/src/types/transactions.ts b/src/types/transactions.ts index 6a934fae..87998340 100644 --- a/src/types/transactions.ts +++ b/src/types/transactions.ts @@ -1,5 +1,5 @@ import type { AddressEx, Page, TokenInfo } from './common' -import type { NativeStakingDepositConfirmationView } from './decoded-data' +import type { NativeStakingDepositConfirmationView, NativeStakingValidatorsExitConfirmationView } from './decoded-data' import type { RichDecodedInfo } from './human-description' export type ParamValue = string | ParamValue[] @@ -73,6 +73,7 @@ export enum TransactionInfoType { TWAP_ORDER = 'TwapOrder', SWAP_TRANSFER = 'SwapTransfer', NATIVE_STAKING_DEPOSIT = 'NativeStakingDeposit', + NATIVE_STAKING_VALIDATORS_EXIT = 'NativeStakingValidatorsExit', } export enum ConflictType { @@ -340,11 +341,18 @@ export type TwapOrder = Omit +export type StakingTxExitInfo = { + type: TransactionInfoType.NATIVE_STAKING_VALIDATORS_EXIT + humanDescription?: string +} & Omit + +export type StakingTxInfo = StakingTxDepositInfo | StakingTxExitInfo + export type TransactionInfo = | Transfer | SettingsChange