/**
 * Core SDK Types
 *
 * This file contains the core type definitions for the PrivacyBoost SDK.
 */
/**
 * SDK Configuration
 *
 * Required configuration for initializing the PrivacyBoost SDK.
 */
export interface PrivacyBoostConfig {
    /**
     * URL of the indexer service
     */
    serverUrl: string;
    /**
     * Chain ID of the target network.
     * If omitted, auto-discovered from the indexer's /api/v1/info endpoint.
     */
    chainId?: number;
    /**
     * Address of the shield contract.
     * If omitted, auto-discovered from the indexer's /api/v1/info endpoint.
     */
    shieldContractAddress?: string;
    /**
     * Address of the WETH contract (optional)
     */
    wethContractAddress?: string;
    /**
     * Application ID for authentication (required)
     */
    appId: string;
    /**
     * JSON-RPC URL for on-chain reads (e.g., token registry lookups)
     */
    rpcUrl?: string;
    /**
     * Address of the TokenRegistry contract (for resolving token IDs during shield)
     */
    tokenRegistryAddress?: string;
    /**
     * Persistence configuration for storing keys across sessions.
     */
    persistence?: {
        /** Storage backend: "localStorage", "indexedDB", or "osKeychain" */
        storage: 'localStorage' | 'indexedDB' | 'osKeychain';
        /** Unlock method: "none" (default), "pin", or "password" */
        unlock?: 'none' | 'pin' | 'password';
    };
    /**
     * Key vault configuration for crypto key isolation.
     *
     * When `mode: 'iframe'`, private keys are held in a cross-origin iframe
     * and crypto operations happen there. Only signatures, ciphertexts, and
     * commitments cross the boundary.
     *
     * When `mode: 'local'` (default), keys live in-process with the WASM module.
     *
     * **Limitation:** In iframe mode, the `tokenProvider` callback in
     * `AuthenticateOptions` is not supported because callbacks cannot be
     * serialized across the postMessage boundary. Use server-side auth
     * setup before calling `authenticate()`, or use local mode.
     */
    keyVault?: {
        mode: 'iframe' | 'local';
        iframeUrl?: string;
    };
    /**
     * Feature flags for optional SDK behaviors.
     */
    features?: {
        /**
         * Auto-consolidate fragmented notes after authentication.
         *
         * When enabled, the SDK automatically merges notes for tokens that have
         * more than the threshold of unspent notes. Runs in the background after
         * login completes and does not block the authentication flow.
         */
        autoConsolidate?: boolean;
        /**
         * Note count threshold to trigger auto-consolidation (default: 15).
         * Only tokens with more unspent notes than this value are consolidated.
         */
        autoConsolidateThreshold?: number;
        /**
         * Maximum consolidation rounds per token (default: 3).
         * Each round merges up to 15 notes into 1-2 output notes.
         */
        autoConsolidateMaxRounds?: number;
    };
    /**
     * Log level for SDK console output.
     *
     * - `"silent"` — no output (default)
     * - `"error"` — errors only
     * - `"warn"` — errors and warnings
     * - `"info"` — errors, warnings, and informational messages
     * - `"debug"` — all messages including verbose debug output
     */
    logLevel?: 'silent' | 'error' | 'warn' | 'info' | 'debug';
}
/**
 * Config with `chainId` and `shieldContractAddress` guaranteed to be present.
 * This is the state after initialization / auto-discovery.
 */
export type ResolvedPrivacyBoostConfig = PrivacyBoostConfig & {
    chainId: number;
    shieldContractAddress: string;
};
/**
 * Key source for privacy key derivation.
 *
 * Passed to `authenticate()` to specify how keys are derived.
 * - `walletDerived`: Derives keys from wallet signature (default when no persistence)
 * - `mnemonic`: Derives keys from a BIP-39 mnemonic phrase
 * - `rawSeed`: Derives keys from a raw 32-byte hex seed
 */
export type KeySource = {
    type: 'walletDerived';
} | {
    type: 'mnemonic';
    phrase: string;
} | {
    type: 'rawSeed';
    hexSeed: string;
};
/**
 * Options for the authenticate() call.
 */
export interface AuthenticateOptions {
    /** Key source for privacy key derivation */
    keySource?: KeySource;
    /** Token provider callback for server-mediated auth */
    tokenProvider?: (payload: import('../resources/Auth').LoginPayload) => Promise<{
        token: string;
        expiresIn: number;
    }>;
}
/**
 * SDK Initialization Options
 *
 * Additional options for SDK initialization.
 */
export interface InitOptions {
    /**
     * Skip WASM validation checks (for testing)
     */
    skipValidation?: boolean;
}
/**
 * Authentication state
 */
export interface AuthState {
    /**
     * Whether wallet is connected
     */
    isConnected: boolean;
    /**
     * Whether user is authenticated (logged in)
     */
    isAuthenticated: boolean;
    /**
     * Connected wallet address
     */
    address?: `0x${string}`;
    /**
     * User's privacy address
     */
    privacyAddress?: string;
    /**
     * Master public key
     */
    mpk?: string;
}
/**
 * Hex string type
 */
export type Hex = `0x${string}`;
//# sourceMappingURL=types.d.ts.map