@exromany/lido-csm-sdk
Version:
[](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [](h
30 lines • 1.25 kB
TypeScript
/**
* 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