/** * Cryptographic utilities for KMS signature handling * Handles ECDSA signature conversion and Ethereum address derivation */ /** * Convert a public key (as big integer coordinates) to an Ethereum address * @param publicKeyX - X coordinate of public key * @param publicKeyY - Y coordinate of public key * @returns Ethereum address */ export declare function publicKeyIntToEthAddress(publicKeyX: bigint, publicKeyY: bigint): string; /** * Parse DER-encoded public key and convert to Ethereum address * @param derPublicKey - DER-encoded public key bytes * @returns Ethereum address */ export declare function derEncodedPublicKeyToEthAddress(derPublicKey: Uint8Array): string; /** * Parse DER-encoded signature to extract r and s values * @param derSignature - DER-encoded signature * @returns Object with r and s as hex strings */ export declare function getSigRS(derSignature: Uint8Array): { r: string; s: string; }; /** * Recover the v value for an ECDSA signature * @param msgHash - Message hash that was signed * @param r - r component of signature * @param s - s component of signature * @param expectedAddress - Expected Ethereum address * @returns v value (27 or 28) */ export declare function getSigV(msgHash: string, r: string, s: string, expectedAddress: string): number; /** * Get complete signature (r, s, v) from DER-encoded KMS signature * @param kmsSignature - DER-encoded signature from KMS * @param msgHash - Message hash that was signed * @param ethAddress - Expected Ethereum address * @returns Complete signature object */ export declare function getSigRSV(kmsSignature: Uint8Array, msgHash: string, ethAddress: string): { r: string; s: string; v: number; }; /** * Convert signature components to a single hex string * @param r - r component * @param s - s component * @param v - v component * @returns Signature as hex string */ export declare function signatureToHex(r: string, s: string, v: number): string;