/**
 * PKP Manager Module
 *
 * Responsible for:
 * - Creating new PKPs (via service or direct)
 * - Querying PKP data from contracts
 * - Managing PKP lifecycle
 * - Caching PKP data for performance
 *
 * Supports two modes:
 * - Service mode: Uses lit-ops-server for PKP operations
 * - Direct mode: Directly interacts with LIT Protocol
 */
import type { Wallet } from "ethers";
import { Result } from "../../types/result";
import { SDKError } from "../../utils/error-handler";
import type { Cache } from "../cache/cache-manager.module";
import type { PKPData, PKPCreationRequest, PKPCreationResult, PKPValidationResult } from "../../interfaces/chunks/pkp-integration.i";
import type { SDKMode } from "../../interfaces/chunks/config.i";
/**
 * PKP Manager configuration
 */
export interface PKPManagerConfig {
    /** Operation mode: service (via lit-ops-server) or direct (LIT Protocol) */
    mode: SDKMode;
    /** LIT network (e.g. chipotle) */
    litNetwork: string;
    /** Service mode: endpoint for lit-ops-server */
    serviceEndpoint?: string;
    /**
     * Service mode: returns `Authorization`-style headers for each request.
     * Called once per request so the underlying session can refresh as
     * needed. Empty object disables the header (server will 401).
     */
    getAuthHeader?: () => Promise<Record<string, string>>;
    /** Direct mode: wallet for PKP operations */
    litOpsWallet?: Wallet;
    /** Optional cache for PKP data */
    cache?: Cache<PKPData>;
    /** Enable debug logging */
    debug?: boolean;
    /** Timeout for service requests (ms) */
    serviceTimeoutMs?: number;
    /** Max retries for failed operations */
    maxRetries?: number;
}
/**
 * PKP Manager Module
 *
 * Manages PKP creation, querying, and lifecycle with support for
 * both service mode and direct mode operations.
 */
export declare class PKPManager {
    private readonly config;
    private readonly serviceTimeoutMs;
    constructor(config: PKPManagerConfig);
    /**
     * Validate PKPManager configuration
     */
    private validateConfig;
    /**
     * Create a new PKP
     *
     * Routes to service mode or direct mode based on configuration.
     *
     * @param request - PKP creation request
     * @returns PKP creation result
     */
    createPKP(request: PKPCreationRequest): Promise<Result<PKPCreationResult, SDKError>>;
    /**
     * Create PKP via lit-ops-server (service mode)
     */
    private createPKPViaService;
    /**
     * Create PKP directly via LIT Protocol (standalone mode)
     *
     * Note: This is a placeholder implementation. In production, this would
     * use the LIT SDK directly to mint a PKP.
     */
    private createPKPDirect;
    /**
     * Get PKP data by token ID
     *
     * Checks cache first, then queries from service/contract if needed.
     *
     * @param tokenId - PKP token ID
     * @returns PKP data or null if not found
     */
    getPKPData(tokenId: string): Promise<Result<PKPData | null, SDKError>>;
    /**
     * Get PKP data from service
     */
    private getPKPDataFromService;
    /**
     * Get PKP data from contract (direct mode)
     *
     * Note: This is a placeholder. In production, would query PKP registry contract.
     */
    private getPKPDataFromContract;
    /**
     * Get PKP public key from token ID
     *
     * Convenience method that extracts just the public key.
     *
     * @param tokenId - PKP token ID
     * @returns PKP public key
     */
    getPKPPublicKey(tokenId: string): Promise<Result<string, SDKError>>;
    /**
     * Validate that a PKP exists and is active
     *
     * @param tokenId - PKP token ID
     * @returns Validation result
     */
    validatePKP(tokenId: string): Promise<Result<PKPValidationResult, SDKError>>;
    /**
     * Clear PKP from cache
     *
     * Useful when PKP data may have changed.
     *
     * @param tokenId - PKP token ID
     */
    clearCache(tokenId: string): void;
    /**
     * Clear all cached PKP data
     */
    clearAllCache(): void;
    /**
     * Get cache statistics
     */
    getCacheStats(): import("../cache/cache-manager.module").CacheStats | null;
}
/**
 * Factory function to create a PKPManager instance
 */
export declare function createPKPManager(config: PKPManagerConfig): Result<PKPManager, SDKError>;
