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

30 lines 1.25 kB
/** * Alternative BLS signature verification implementation for Ethereum deposit data. * * This implementation follows the Ethereum consensus specification closely: * - Proper SSZ serialization using @chainsafe/ssz * - Clear separation of domain computation, signing root, and verification * - Better error handling and type safety * - Compatible with both @chainsafe/bls and bls-eth-wasm * * Reference: * - https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#bls-signatures * - https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/deposit-contract.md */ import { SUPPORTED_CHAINS } from '../common/index.js'; import { DepositData } from './types.js'; /** * Verify BLS signature for deposit data following Ethereum consensus spec * * @param data - Deposit data to verify * @param chainId - Chain ID (mainnet or testnet) * @returns Promise<boolean> - True if signature is valid * * @example * const isValid = await verifyDepositSignature(depositData, CHAINS.Mainnet); * if (!isValid) { * console.error('Invalid signature'); * } */ export declare const verifyDepositSignature: (data: DepositData, chainId: SUPPORTED_CHAINS) => Promise<boolean>; //# sourceMappingURL=signature.d.ts.map