import { S as StorageAdapter, M as MerkleNodeRecord, a as MerkleTreeState, E as EntryMemoRecord, L as ListEntryMemosQuery, b as EntryNullifierRecord, c as ListEntryNullifiersQuery, H as Hex, d as SyncCursor, U as UtxoRecord, e as ListUtxosQuery, O as OperationType, f as StoredOperation, g as OperationDetailFor, h as OperationStatus, i as ListOperationsQuery } from './index-CI7UllxU.js';
export { A as App_ABI, j as AssetOverrideEntry, k as AssetsOverride, B as BABYJUBJUB_SCALAR_FIELD, l as BASE_DEV, m as BASE_MAINNET, n as BSC_DEV, o as BSC_MAINNET, p as BSC_TESTNET, q as BSC_TESTNET_DEV, C as ChainConfigInput, r as CommitmentData, s as CryptoToolkit, D as DepositOperation, t as DepositOperationDetail, u as DummyFactory, v as ETH_DEV, w as ETH_MAINNET, K as KeyManager, x as KeyValueClient, y as KeyValueStore, z as KeyValueStoreOptions, F as LedgerInfo, G as MemoKit, I as MemoryStore, J as MerkleLeafRecord, N as OCashSdk, P as OCashSdkConfig, Q as OperationCreateInput, R as OpsApi, T as PlannerEstimateTransferResult, V as PlannerEstimateWithdrawResult, W as ProofResult, X as RedisStore, Y as RedisStoreOptions, Z as RelayerRequest, _ as SEPOLIA_DEV, $ as SEPOLIA_TESTNET, a0 as SdkEvent, a1 as SyncChainStatus, a2 as TokenMetadata, a3 as TransactionReceipt, a4 as TransferOperation, a5 as TransferOperationDetail, a6 as TransferWitnessInput, a7 as Utils, a8 as WalletSessionInput, a9 as WithdrawOperation, aa as WithdrawOperationDetail, ab as WithdrawWitnessInput, ac as WitnessBuildResult, ad as WitnessContext, ae as assertChainConfigInput, af as assertTokenList, ag as assertTokenMetadata, ah as calcTransferProofBinding, ai as calcWithdrawProofBinding, aj as createSdk, ak as default, al as defaultAssetsOverrideMainnet, am as defaultAssetsOverrideTestnet, an as fetchPoolTokensFromContract, ao as normalizeTokenMetadata } from './index-CI7UllxU.js';
import 'viem';

type IndexedDbStoreOptions = {
    dbName?: string;
    storeName?: string;
    indexedDb?: IDBFactory;
    maxOperations?: number;
};
/**
 * IndexedDB-backed StorageAdapter for browser environments.
 */
declare class IndexedDbStore implements StorageAdapter {
    private readonly options;
    private static readonly DB_VERSION;
    private walletId;
    private readonly cursors;
    private operations;
    private merkleTrees;
    private db;
    private readonly maxOperations;
    /**
     * Create an IndexedDbStore with optional database settings.
     */
    constructor(options?: IndexedDbStoreOptions);
    /**
     * Initialize store for a wallet id and load persisted state.
     */
    init(options?: {
        walletId?: string;
    }): Promise<void>;
    /**
     * Close the DB connection and clear handle.
     */
    close(): Promise<void>;
    /**
     * Resolve base object store name (default: ocash_store).
     */
    private storeName;
    private walletKey;
    private storeDefs;
    private openDb;
    private storeNames;
    private getAll;
    private getAllByIndex;
    private getByKey;
    private getByKeys;
    private putMany;
    private deleteByKeys;
    private deleteAllByIndex;
    /**
     * Load persisted state into memory and normalize it.
     */
    private load;
    /**
     * Get a merkle node by id.
     */
    getMerkleNode(chainId: number, id: string): Promise<MerkleNodeRecord | undefined>;
    /**
     * Upsert merkle nodes and persist.
     */
    upsertMerkleNodes(chainId: number, nodes: MerkleNodeRecord[]): Promise<void>;
    /**
     * Clear merkle nodes for a chain.
     */
    clearMerkleNodes(chainId: number): Promise<void>;
    /**
     * Get persisted merkle tree metadata for a chain.
     */
    getMerkleTree(chainId: number): Promise<MerkleTreeState | undefined>;
    /**
     * Persist merkle tree metadata for a chain.
     */
    setMerkleTree(chainId: number, tree: MerkleTreeState): Promise<void>;
    /**
     * Clear merkle tree metadata for a chain.
     */
    clearMerkleTree(chainId: number): Promise<void>;
    /**
     * Upsert entry memos and persist.
     */
    upsertEntryMemos(memos: EntryMemoRecord[]): Promise<void>;
    /**
     * List entry memos with query filtering and pagination.
     */
    listEntryMemos(query: ListEntryMemosQuery): Promise<{
        total: number;
        rows: EntryMemoRecord[];
    }>;
    /**
     * Clear entry memo cache for a chain.
     */
    clearEntryMemos(chainId: number): Promise<void>;
    /**
     * Upsert entry nullifiers and persist.
     */
    upsertEntryNullifiers(nullifiers: EntryNullifierRecord[]): Promise<void>;
    /**
     * List entry nullifiers with query filtering and pagination.
     */
    listEntryNullifiers(query: ListEntryNullifiersQuery): Promise<{
        total: number;
        rows: EntryNullifierRecord[];
    }>;
    /**
     * Clear entry nullifier cache for a chain.
     */
    clearEntryNullifiers(chainId: number): Promise<void>;
    /**
     * Get persisted merkle leaves for a chain.
     */
    getMerkleLeaves(chainId: number): Promise<Array<{
        cid: number;
        commitment: Hex;
    }> | undefined>;
    /**
     * Get a merkle leaf by cid.
     */
    getMerkleLeaf(chainId: number, cid: number): Promise<{
        chainId: number;
        cid: number;
        commitment: `0x${string}`;
    } | undefined>;
    /**
     * Append contiguous merkle leaves and persist.
     */
    appendMerkleLeaves(chainId: number, leaves: Array<{
        cid: number;
        commitment: Hex;
    }>): Promise<void>;
    /**
     * Clear merkle leaves for a chain.
     */
    clearMerkleLeaves(chainId: number): Promise<void>;
    /**
     * Get persisted sync cursor for a chain.
     */
    getSyncCursor(chainId: number): Promise<SyncCursor | undefined>;
    /**
     * Set persisted sync cursor for a chain.
     */
    setSyncCursor(chainId: number, cursor: SyncCursor): Promise<void>;
    /**
     * Upsert UTXOs and persist.
     */
    upsertUtxos(utxos: UtxoRecord[]): Promise<void>;
    /**
     * List UTXOs with query filtering and pagination.
     */
    listUtxos(query?: ListUtxosQuery): Promise<{
        total: number;
        rows: UtxoRecord[];
    }>;
    /**
     * Mark UTXOs as spent by nullifier and persist.
     */
    markSpent(input: {
        chainId: number;
        nullifiers: Hex[];
    }): Promise<number>;
    /**
     * Create and persist an operation record.
     */
    createOperation<TType extends OperationType>(input: Omit<StoredOperation<OperationDetailFor<TType>>, 'id' | 'createdAt' | 'status'> & Partial<Pick<StoredOperation<OperationDetailFor<TType>>, 'createdAt' | 'id' | 'status'>> & {
        type: TType;
    }): {
        id: string;
        createdAt: number;
        status: OperationStatus;
        type: OperationType & TType;
        chainId?: number | undefined;
        tokenId?: string | undefined;
        requestUrl?: string | undefined;
        relayerTxHash?: `0x${string}` | undefined;
        txHash?: `0x${string}` | undefined;
        detail?: OperationDetailFor<TType> | undefined;
        error?: string | undefined;
    };
    /**
     * Update an operation record and persist.
     */
    updateOperation(id: string, patch: Partial<StoredOperation>): void;
    /**
     * Delete an operation record and persist.
     */
    deleteOperation(id: string): boolean;
    /**
     * Clear all operations and persist.
     */
    clearOperations(): void;
    /**
     * Prune operations to a maximum count and persist.
     */
    pruneOperations(options?: {
        max?: number;
    }): number;
    /**
     * List operations with filtering/pagination.
     */
    listOperations(input?: number | ListOperationsQuery): StoredOperation[];
}

export { EntryMemoRecord, EntryNullifierRecord, Hex, IndexedDbStore, type IndexedDbStoreOptions, ListEntryMemosQuery, ListEntryNullifiersQuery, ListOperationsQuery, ListUtxosQuery, MerkleNodeRecord, MerkleTreeState, OperationStatus, OperationType, StorageAdapter, StoredOperation, SyncCursor, UtxoRecord };
