/**
 * Transaction-related types
 */
import type { Hex } from './common';
export type ComplianceStatus = 'PENDING' | 'LEGIT' | 'ILLICIT';
export declare enum TransactionType {
    shield = "shield",
    unshield = "unshield",
    transfer = "transfer"
}
export declare enum TransactionStatus {
    pending = "pending",
    preconfirmed = "preconfirmed",
    completed = "completed",
    failed = "failed",
    blocked = "blocked"
}
/**
 * Direction of a transaction from the user's perspective.
 * - incoming: User is receiving funds (shields, received transfers)
 * - outgoing: User is sending funds (unshields, sent transfers)
 */
export declare enum TransactionDirection {
    incoming = "incoming",
    outgoing = "outgoing"
}
export interface ReceiverTransfer {
    pubKey: Hex;
    amount: bigint;
}
export interface PendingTransaction {
    txHash: Hex;
    type: TransactionType;
    status: TransactionStatus;
    direction: TransactionDirection;
    error?: string;
    tokenAddress?: Hex;
    amount?: bigint;
    from?: Hex;
    to?: Hex;
    receivers: ReceiverTransfer[];
    createdAt: number;
    updatedAt: number;
    tokenSymbol?: string;
    commitment?: Hex;
    complianceStatus?: ComplianceStatus;
    /** Server-assigned ID for status polling (shield requestId, transfer/unshield queueId) */
    requestId?: string;
    /** Whether this transaction represents a change note (self-returning output) */
    isChange?: boolean;
}
/**
 * Generate a pending transaction hash placeholder
 * Format: 0x followed by 64 hex chars (starts with zeros to indicate pending)
 */
export declare function generatePendingTxHash(type: TransactionType): Hex;
/**
 * Check if a txHash is a pending placeholder
 */
export declare function isPendingTxHash(txHash: Hex): boolean;
/**
 * A single UTXO-level note within a grouped wallet transaction.
 */
export interface TransactionNote {
    value: string;
    direction: string;
    isChange: boolean;
    leafIndex?: number;
    nullifier?: string;
    counterparty?: string;
    counterpartyType?: string;
}
/**
 * A grouped wallet transaction (grouped by txHash).
 * Returned by GET /api/v1/wallets/{pubkey}/transactions.
 */
export interface Transaction {
    txHash: string;
    txType: string;
    direction: string;
    value: string;
    tokenId: number;
    createdAt: number;
    appId: string;
    counterparty?: string;
    counterpartyType?: string;
    notes: TransactionNote[];
}
/**
 * Paginated wallet transactions response.
 */
export interface TransactionsResponse {
    data: Transaction[];
    limit: number;
    next?: string;
    /** Mapped PendingTransaction[] (resolved tokenIds, proper enums). Populated by fetchHistory(). */
    transactions?: PendingTransaction[];
}
/**
 * Shield status response from GET /api/v1/transactions/shields/{requestId}
 */
export interface ShieldStatusResponse {
    id: string;
    type: 'shield';
    status: 'pending' | 'processing' | 'preconfirmed' | 'completed' | 'failed';
    createdAt?: string;
    updatedAt?: string;
    txHash?: string;
    leafIndex?: number;
    error?: string;
}
/**
 * Transfer or unshield status response from
 * GET /api/v1/transactions/transfers/{id} or /unshields/{id}
 */
export interface TransferStatusResponse {
    id: string;
    type: 'transfer' | 'unshield';
    status: 'pending' | 'processing' | 'preconfirmed' | 'completed' | 'failed';
    createdAt?: string;
    updatedAt?: string;
    txHash?: string;
    error?: string;
}
//# sourceMappingURL=transaction.d.ts.map