/** * Peer message signing: EIP-191 personal_sign with AntSeed domain prefixes to * prevent cross-domain signature replay. Moved from @antseed/node p2p/identity. */ import { Wallet } from 'ethers'; export declare function hexToBytes(hex: string): Uint8Array; export declare function bytesToHex(bytes: Uint8Array): string; /** * Sign binary data. Domain-tagged with "antseed-data-v1:" to prevent * cross-domain replay. Uses EIP-191 personal_sign; returns 65 bytes (r+s+v). */ export declare function signData(wallet: Wallet, data: Uint8Array): Uint8Array; /** * Verify a binary data signature from a remote peer using ecrecover. * The expectedAddress is the 40-char hex peerId (no 0x prefix). */ export declare function verifySignature(expectedAddress: string, signature: Uint8Array, data: Uint8Array): boolean; /** * Sign a UTF-8 message and return a hex-encoded secp256k1 signature (130 hex * chars = 65 bytes). Domain-tagged with "antseed-msg-v1:". */ export declare function signUtf8(wallet: Wallet, message: string): string; /** * Verify a UTF-8 message against a hex-encoded secp256k1 signature. * Returns true if the recovered address matches the expected address. */ export declare function verifyUtf8(address: string, message: string, signatureHex: string): boolean; //# sourceMappingURL=signing.d.ts.map