/** * Privacy API client for B402 backend */ import type { ShieldCommitment, NullifierScanResponse, MerkleProofResponse } from './types'; export type { ShieldCommitment, OutputCommitment, MerkleProofResponse } from './types'; export interface CommitmentsResponse { shields: ShieldCommitment[]; unshieldedAmounts?: Record; } export declare function fetchCommitmentsByEOA(apiUrl: string, eoa: string, incognitoWallet?: string, chainId?: number): Promise; export declare function fetchNullifierData(apiUrl: string, nullifiers: string[], chainId?: number): Promise; export declare function fetchNullifierDataBatched(apiUrl: string, nullifiers: string[], chainId?: number): Promise; /** * Fetch merkle proof with retry logic * * The backend merkle tree may take 30-90 seconds to sync after a new shield. * This function retries with exponential backoff until the proof is available. */ export declare function fetchMerkleProof(apiUrl: string, commitmentHash: string, treeNumber: string, position: string, options?: { maxRetries?: number; initialDelayMs?: number; chainId?: number; }): Promise; export declare function fetchMerkleProofsBatch(apiUrl: string, requests: Array<{ commitmentHash: string; treeNumber: string; position: string; }>, options?: { maxRetries?: number; initialDelayMs?: number; chainId?: number; }): Promise<(MerkleProofResponse | null)[]>; export declare function submitUnshieldTransaction(apiUrl: string, transaction: { serializedTransaction: string; toAddress: string; relayerFee: string; }): Promise<{ txHash: string; }>; export interface UnshieldQueueRequest { txidVersion: string; transactionTo: string; transactionData: string; chain: { type: number; id: number; }; nullifierHash: string; } export interface UnshieldQueueResponse { exists: boolean; unshieldId: string; timeElapsedMs?: number; broadcasterTxHash?: string; createdAt?: string; broadcastedAt?: string; completedAt?: string; } export declare function queueUnshield(_apiUrl: string, // Ignored - using internal route for security request: UnshieldQueueRequest): Promise;