import type { CreateInvoiceOpts, PaymentInvoice, PaymentRail, VerifyTransactionResult } from './types.js';
/** Convert XNO (decimal string or number) to raw (integer string). */
export declare function xnoToRaw(xno: string | number): string;
/** Convert raw (integer string) to XNO (decimal string). */
export declare function rawToXno(raw: string): string;
/**
 * Read-only callback the rail uses to fetch recent receive blocks
 * for the configured receiving address. The shape mirrors what the
 * Nano JSON-RPC `account_history` action returns; callers can wrap
 * any RPC client (public node, internal node, mock for tests).
 */
export interface NanoHistoryEntry {
    hash: string;
    type?: string;
    subtype?: string;
    account?: string;
    /** Raw amount as string. */
    amount: string;
    local_timestamp?: string;
}
export type FetchHistory = (address: string, count: number) => Promise<NanoHistoryEntry[]>;
/**
 * Read-only callback for `verifyTransaction`. Wraps `block_info`.
 */
export interface NanoBlockInfo {
    /** 'true' | 'false' from RPC; rail interprets as boolean. */
    confirmed?: string;
    /** Raw amount as string. */
    amount?: string;
    block_account?: string;
    contents?: {
        link_as_account?: string;
    };
    local_timestamp?: string;
}
export type FetchBlockInfo = (txProof: string) => Promise<NanoBlockInfo>;
export interface NanoRailConfig {
    /** Receiving Nano address (xrb_... or nano_...) the gateway controls. */
    receivingAddress: string;
    /** Caller-supplied history fetcher. Required for checkStatus. */
    fetchHistory: FetchHistory;
    /** Caller-supplied block_info fetcher. Required for verifyTransaction. */
    fetchBlockInfo: FetchBlockInfo;
    /** Optional uniqueness-offset bound (default 9999 raw). The rail adds
     *  a random raw offset in [1, offsetBound] to each invoice so distinct
     *  invoices have distinct on-chain fingerprints. */
    offsetBound?: number;
}
export declare class NanoPaymentRail implements PaymentRail {
    readonly name = "nano";
    readonly currency = "XNO";
    private readonly config;
    private readonly invoices;
    private readonly revokedWallets;
    private readonly offsetBound;
    constructor(config: NanoRailConfig);
    createInvoice(opts: CreateInvoiceOpts): Promise<PaymentInvoice>;
    checkStatus(invoiceId: string): Promise<PaymentInvoice>;
    verifyTransaction(txProof: string, expectedAmountBaseUnits?: string): Promise<VerifyTransactionResult>;
    revokeWallet(walletId: string): Promise<boolean>;
    isWalletRevoked(walletId: string): boolean;
}
export declare function createNanoRail(config: NanoRailConfig): NanoPaymentRail;
//# sourceMappingURL=nano.d.ts.map