// Types for holtpay.mjs (for TypeScript projects; copy it next to holtpay.mjs). export interface Invoice { id: string; status: "pending" | "confirming" | "paid" | "expired"; test: boolean; network: string; currency: string; amount: string; pay_amount: string; /** What actually arrived (null until paid, or when settled by hand without a transfer). */ paid_amount: string | null; /** How a paid invoice was settled. */ settled_by: "chain" | "tolerance" | "merchant" | "admin" | null; payment_link_id: string | null; address: string; order_id: string | null; description: string | null; metadata: Record | null; tx_hash: string | null; from_address: string | null; explorer_url: string | null; checkout_url: string; redirect_url: string | null; created_at: string; expires_at: string; paid_at: string | null; } export interface NetworkInfo { id: string; name: string; test: boolean; wallet_type: "evm" | "tron" | "test"; currencies: string[]; } export interface CreateInvoiceInput { amount: string | number; currency: string; network: string; order_id?: string; description?: string; metadata?: Record; redirect_url?: string; expires_in_minutes?: number; } export interface WebhookEvent { id: string; event: "invoice.paid" | "invoice.confirming" | "invoice.expired"; created_at: string; data: Invoice; } export declare class HoltPayError extends Error { status: number; code: string; details: Record; } export declare class HoltPay { constructor(options: { apiKey: string; baseUrl: string; timeoutMs?: number }); readonly baseUrl: string; request(method: string, path: string, body?: unknown): Promise; networks(): Promise; createInvoice(input: CreateInvoiceInput): Promise; getInvoice(id: string): Promise; listInvoices(filters?: { status?: string; order_id?: string; test?: boolean; limit?: number; before?: string }): Promise; simulatePayment(id: string): Promise; static verifyWebhook(rawBody: string | Buffer, header: string | undefined, secret: string, toleranceSeconds?: number): WebhookEvent; } export default HoltPay;