export { C as CreateInvoiceEscrowParams, b as CreateInvoiceParams, D as DeroChainId, a as DeroPayConfig, c as DeroPayError, d as DeroPayErrorCode, E as EscrowInvoiceStatus, I as Invoice, e as InvoiceEscrow, f as InvoiceStatus, P as Payment, g as PaymentStatus, W as WalletStatus, h as WebhookEvent, i as WebhookEventType } from '../types-Bsy2LUTI.js'; /** * Payment ID generation for DERO integrated addresses. * * DERO uses RPC_DESTINATION_PORT (uint64) as a payment identifier, * embedded into integrated addresses. Each invoice gets a unique * payment ID so incoming transactions can be matched. */ /** * Generate a random uint64 payment ID. * Uses crypto.getRandomValues for security, falling back to Math.random. * * @returns A BigInt in the uint64 range (0 to 2^64 - 1) */ declare function generatePaymentId(): bigint; /** * Convert a payment ID to a hex string (16 chars, zero-padded). */ declare function paymentIdToHex(paymentId: bigint): string; /** * Parse a hex string back to a payment ID. */ declare function hexToPaymentId(hex: string): bigint; /** * Validate that a value is a valid uint64 payment ID. */ declare function isValidPaymentId(value: bigint): boolean; /** * Amount conversion utilities for DERO. * * DERO uses 5 decimal places. * 1 DERO = 100,000 atomic units (1e5). */ /** Number of atomic units per DERO */ declare const ATOMIC_UNITS_PER_DERO = 100000n; /** Number of decimal places */ declare const DERO_DECIMALS = 5; /** * Convert a human-readable DERO amount to atomic units. * * @param dero - Amount in DERO (e.g., "1.5" or 1.5) * @returns Amount in atomic units as BigInt * * @example * ```ts * deroToAtomic("1.0") // 100_000n * deroToAtomic("0.001") // 100n * deroToAtomic(25) // 2_500_000n * ``` */ declare function deroToAtomic(dero: string | number): bigint; /** * Convert atomic units to a human-readable DERO string. * * @param atomic - Amount in atomic units * @param maxDecimals - Maximum decimal places to show (default: 5) * @returns Formatted DERO amount string * * @example * ```ts * atomicToDero(100_000n) // "1.00000" * atomicToDero(150_000n) // "1.50000" * atomicToDero(2_500_000n) // "25.00000" * atomicToDero(10n, 2) // "0.00" * ``` */ declare function atomicToDero(atomic: bigint, maxDecimals?: number): string; /** * Format atomic units as a display string with "DERO" suffix. * * @example * ```ts * formatDero(150_000n) // "1.50000 DERO" * ``` */ declare function formatDero(atomic: bigint, maxDecimals?: number): string; /** * Validate that an amount is a positive value suitable for an invoice. */ declare function isValidAmount(atomic: bigint): boolean; declare function formatX402AuthorizationHeader(proof: string): string; declare function parseX402AuthorizationHeader(header: string | null): string | null; export { ATOMIC_UNITS_PER_DERO, DERO_DECIMALS, atomicToDero, deroToAtomic, formatDero, formatX402AuthorizationHeader, generatePaymentId, hexToPaymentId, isValidAmount, isValidPaymentId, parseX402AuthorizationHeader, paymentIdToHex };