import { KeyManager, NIP1SignedObject, VDRRegistry, SignedData, IdentityEnv } from '@nuwa-ai/identity-kit';
import { DeepLinkManager } from './deeplink/DeepLinkManager';
export interface IdentityKitWebOptions {
    /** Application name, used to build key id fragment; optional */
    appName?: string;
    cadopDomain?: string;
    storage?: 'local' | 'indexeddb' | 'memory';
    /** Optional explicit RPC endpoint for Rooch node */
    roochRpcUrl?: string;
}
/**
 * IdentityKitWeb – High-level Web SDK for Nuwa Identity Kit
 * Provides a high-level API for web applications
 */
export declare class IdentityKitWeb {
    private keyManager;
    private deepLinkManager;
    private cadopDomain;
    private appName?;
    private identityEnv;
    private constructor();
    /**
     * Initialize the IdentityKitWeb with automatic component initialization
     */
    static init(options?: IdentityKitWebOptions): Promise<IdentityKitWeb>;
    /**
     * Advanced factory method for users who need to provide custom components
     */
    static create(options: {
        keyManager: KeyManager;
        deepLinkManager?: DeepLinkManager;
        identityEnv: IdentityEnv;
        cadopDomain?: string;
        appName?: string;
    }): Promise<IdentityKitWeb>;
    /**
     * Check if the user is connected
     */
    isConnected(): Promise<boolean>;
    /**
     * Get the current DID
     */
    getDid(): Promise<string>;
    /**
     * List all key IDs
     */
    listKeyIds(): Promise<string[]>;
    /**
     * Connect to Cadop
     * This will open a new window with the Cadop add-key page
     */
    connect(options?: {
        scopes?: string[];
    }): Promise<void>;
    /**
     * Handle the callback from Cadop
     */
    handleCallback(search: string): Promise<void>;
    /**
     * Sign an operation payload using DIDAuth v1
     * @param payload Object containing `operation` and `params` fields (other fields will be added automatically)
     */
    sign(payload: Omit<SignedData, 'nonce' | 'timestamp'>): Promise<NIP1SignedObject>;
    /**
     * Verify a signature
     */
    verify(sig: NIP1SignedObject, opts?: {
        maxClockSkew?: number;
    }): Promise<boolean>;
    /**
     * Logout (clear all keys)
     */
    logout(): Promise<void>;
    /**
     * Generate a readable idFragment based on the application name.
     * 1. Slugify the provided appName (keep a-z, 0-9, _ and -)
     * 2. If slug becomes empty (e.g. non-Latin name), fall back to current hostname
     * 3. If hostname slug is still empty (edge case), use default 'key'
     * Always append timestamp to ensure uniqueness.
     */
    private generateIdFragment;
    /**
     * Get the KeyManager instance
     */
    getKeyManager(): KeyManager;
    /**
     * Get the IdentityEnv instance
     */
    getIdentityEnv(): IdentityEnv;
    /**
     * Get the DeepLinkManager instance
     */
    getDeepLinkManager(): DeepLinkManager;
    /**
     * Get the Cadop domain
     */
    getCadopDomain(): string;
    /**
     * Get the app name
     */
    getAppName(): string | undefined;
    /**
     * Expose the global VDRRegistry instance
     */
    static get registry(): VDRRegistry;
}
