UNPKG

@exromany/lido-csm-sdk

Version:

[![GitHub license](https://img.shields.io/github/license/lidofinance/lido-csm-sdk?color=limegreen)](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [![Version npm](https://img.shields.io/npm/v/@lidofinance/lido-csm-sdk?label=version)](h

65 lines 1.92 kB
import { Hex } from 'viem'; import { SUPPORTED_CHAINS } from '../common/index.js'; export type DepositDataCommon = { pubkey: Hex; withdrawal_credentials: Hex; amount: number; signature: Hex; deposit_message_root: Hex; deposit_data_root: Hex; fork_version: Hex; deposit_cli_version: string; }; export type DepositDataV2 = DepositDataCommon & { network_name: string; }; export type DepositDataV1 = DepositDataCommon & { eth2_network_name: string; }; export type DepositData = DepositDataV2 | DepositDataV1; export declare enum ValidationErrorCode { INVALID_PUBKEY = "INVALID_PUBKEY", INVALID_SIGNATURE = "INVALID_SIGNATURE", INVALID_WITHDRAWAL_CREDENTIALS = "INVALID_WITHDRAWAL_CREDENTIALS", INVALID_AMOUNT = "INVALID_AMOUNT", INVALID_NETWORK = "INVALID_NETWORK", INVALID_FORK_VERSION = "INVALID_FORK_VERSION", INVALID_DEPOSIT_ROOT = "INVALID_DEPOSIT_ROOT", DUPLICATE_PUBKEY = "DUPLICATE_PUBKEY", PREVIOUSLY_SUBMITTED = "PREVIOUSLY_SUBMITTED", INVALID_BLS_SIGNATURE = "INVALID_BLS_SIGNATURE", MISSING_FIELD = "MISSING_FIELD", INVALID_FORMAT = "INVALID_FORMAT", VALIDATOR_EXISTS = "VALIDATOR_EXISTS" } export type ValidationError = { index: number; field?: string; message: string; code: ValidationErrorCode; }; export type RemoveKeyResult = { success: boolean; data?: DepositData[]; json?: string; error?: string; }; export type ParseResult = { success: boolean; data?: DepositData[]; error?: string; }; export type ValidationProps = { chainId: SUPPORTED_CHAINS; withdrawalCredentials: string; }; export type ValidationExtendedProps = ValidationProps & { currentBlockNumber?: number; }; export type DuplicateProcessingConfig = { pubkey: Hex; index: number; pubkeyMap: Map<Hex, number[]>; errors: ValidationError[]; }; //# sourceMappingURL=types.d.ts.map