/** * Shared validation constants for Bitcoin-related input sanitization. * * These are used across mempool API clients, broadcast services, and * transaction construction to enforce consistent format checks. */ /** Non-empty string of hexadecimal characters (case-insensitive). */ export declare const HEX_RE: RegExp; /** Bitcoin txid: exactly 64 hex characters (32 bytes). */ export declare const TXID_RE: RegExp; /** * Bitcoin address format gate: 25–90 alphanumeric characters. * Covers legacy (P2PKH/P2SH), bech32 (P2WPKH/P2WSH), bech32m (P2TR), * and regtest addresses (bcrt1... which are 62–64 chars for 32-byte witness programs). * Upper bound of 90 provides headroom for future address formats. * This is a format gate to prevent path-traversal — not full address validation. */ export declare const BITCOIN_ADDRESS_RE: RegExp; /** * Known Bitcoin scriptPubKey prefixes: * - P2PKH: 76a914...88ac (25 bytes) * - P2SH: a914...87 (23 bytes) * - P2WPKH: 0014... (22 bytes) * - P2WSH: 0020... (34 bytes) * - P2TR: 5120... (34 bytes) */ export declare const KNOWN_SCRIPT_PREFIXES: readonly ["76a914", "a914", "0014", "0020", "5120"]; /** * Upper bound on the implied miner fee (0.01 BTC = 1,000,000 sats). * Catches inflated input values from a compromised mempool API — if inputs are * grossly overstated the implied fee becomes unreasonably large. The April 2024 * Runes spike saw ~450 sat/vB; at 500 vB that's ~225k sats, well under this cap. */ export declare const MAX_REASONABLE_FEE_SATS = 1000000n; //# sourceMappingURL=validation.d.ts.map