UNPKG

@xchainjs/xchain-utxo

Version:
39 lines (38 loc) 1.29 kB
import { Address } from '@xchainjs/xchain-util'; import { FeeBounds } from '@xchainjs/xchain-client'; import { TxParams, UTXO } from './types'; /** * Comprehensive input validation for UTXO transactions */ export declare class UtxoTransactionValidator { /** * Validate transaction parameters */ static validateTransferParams(params: TxParams & { sender?: Address; feeRate?: number; }, feeBounds?: FeeBounds): void; /** * Validate UTXO set for consistency and correctness */ static validateUtxoSet(utxos: UTXO[]): void; /** * Basic address validation - checks for null/empty and basic format * NOTE: Chain-specific validation should be done by the respective client packages */ static validateAddressBasic(address: string): void; /** * Validate fee rate against network conditions */ static validateFeeRate(feeRate: number, networkConditions?: { minFeeRate?: number; maxFeeRate?: number; recommendedRange?: [number, number]; }): void; /** * Validate transaction size limits */ static validateTransactionSize(estimatedSize: number, maxSize?: number): void; private static containsControlCharacters; private static sanitizeParamsForLogging; }