/**
 * Transaction builder for VRSC payments.
 * Builds and signs standard payment transactions offline using @bitgo/utxo-lib.
 *
 * Supports:
 * - R-address (P2PKH) inputs and outputs
 * - i-address (P2ID / identity) inputs and outputs
 * - Mixed inputs (spend from both R and i address in one TX)
 */
import type { Utxo } from '../client/index.js';
export interface PaymentParams {
    wif: string;
    toAddress: string;
    amount: number;
    utxos: Utxo[];
    fee?: number;
    changeAddress?: string;
    network?: 'verus' | 'verustest';
}
/**
 * Build a P2ID (pay-to-identity) output script for an i-address.
 *
 * Verus identity output script format (36 bytes):
 *   PUSH(5) [COptCCParams: v4, EVAL_IDENTITY, m=0, n=0]
 *   OP_CHECKCRYPTOCONDITION
 *   PUSH(27) [COptCCParams: v4, EVAL_IDENTITY, m=0, n=1, dests=1, type=ID, <20-byte hash>]
 *   OP_DROP
 */
export declare function buildP2IDScript(iAddress: string): Buffer;
/**
 * Check if an address is an i-address (identity address).
 */
export declare function isIAddress(address: string): boolean;
/**
 * Select UTXOs to cover the target amount (greedy algorithm).
 * Prefers larger UTXOs to minimize inputs.
 */
export declare function selectUtxos(utxos: Utxo[], targetAmount: number): {
    selected: Utxo[];
    total: number;
};
/**
 * Build a signed payment transaction.
 * Supports sending from/to both R-addresses and i-addresses.
 *
 * @returns Signed raw transaction hex ready for broadcast
 */
export declare function buildPayment(params: PaymentParams): string;
export declare function buildPayment(params: PaymentParams & {
    returnDetails: true;
}): MultiPaymentResult;
export interface PaymentOutput {
    address: string;
    amount: number;
}
export interface MultiPaymentParams {
    wif: string;
    outputs: PaymentOutput[];
    utxos: Utxo[];
    fee?: number;
    changeAddress?: string;
    network?: 'verus' | 'verustest';
}
/**
 * Build a signed transaction with multiple outputs.
 * Used for sending agent payment + platform fee in a single TX.
 *
 * @returns Signed raw transaction hex ready for broadcast
 */
export interface MultiPaymentResult {
    rawhex: string;
    /** UTXOs consumed by this TX — exclude these from future calls */
    spentUtxos: Array<{
        txid: string;
        vout: number;
    }>;
    /** Change output created — include this as UTXO in future calls */
    changeUtxo: Utxo | null;
}
export declare function buildMultiPayment(params: MultiPaymentParams): string;
export declare function buildMultiPayment(params: MultiPaymentParams & {
    returnDetails: true;
}): MultiPaymentResult;
export declare function wifToAddress(wif: string, networkName?: 'verus' | 'verustest'): string;
export declare function wifToPubkey(wif: string, networkName?: 'verus' | 'verustest'): string;
//# sourceMappingURL=payment.d.ts.map