import { BitcoinAdapter } from '@reown/appkit-adapter-bitcoin';
import { createAppKit } from '@reown/appkit/react';
/**
 * Shared Bitcoin AppKit config singleton
 *
 * This allows the AppKitBTCProvider (class-based) to access the AppKit modal
 * and Bitcoin adapter that's provided by the application-level initialization.
 *
 * Usage:
 * 1. Application sets the config: setSharedBtcAppKitConfig({ modal, adapter, network })
 * 2. AppKitBTCProvider uses: getSharedBtcAppKitConfig()
 */
/**
 * Shape callers pass to {@link setSharedBtcAppKitConfig}. `connectionEvents`
 * is internal — callers may omit it and the setter will provision a private
 * {@link EventTarget} for them.
 */
export interface SharedBtcAppKitConfigInput {
    modal: ReturnType<typeof createAppKit>;
    adapter: BitcoinAdapter;
    network: "mainnet" | "signet";
    /**
     * Optional override for the private connection-events bus. Tests can
     * inject a deterministic instance; production callers should leave this
     * unset and let the setter create one.
     */
    connectionEvents?: EventTarget;
}
/**
 * Resolved shape returned from {@link getSharedBtcAppKitConfig}. Always
 * includes {@link SharedBtcAppKitConfig.connectionEvents} — the setter
 * fills it in if the caller omitted one.
 *
 * `connectionEvents` is the in-process bus the bridge hook
 * (`useAppKitBtcBridge`) uses to notify `AppKitBTCProvider` when the
 * AppKit account changes. It deliberately is NOT exposed on `window`:
 * a same-origin attacker (XSS, malicious extension content script) can
 * dispatch arbitrary events on `window`, but cannot reach a private
 * `EventTarget` instance held only by this singleton. This closes the
 * spoof channel that previously let any same-origin script overwrite
 * the cached connected address/pubkey.
 */
export interface SharedBtcAppKitConfig {
    modal: ReturnType<typeof createAppKit>;
    adapter: BitcoinAdapter;
    network: "mainnet" | "signet";
    connectionEvents: EventTarget;
}
export declare function setSharedBtcAppKitConfig(config: SharedBtcAppKitConfigInput): void;
export declare function getSharedBtcAppKitConfig(): SharedBtcAppKitConfig;
export declare function hasSharedBtcAppKitConfig(): boolean;
/**
 * Test-only helper that wipes the singleton between tests. Not part of
 * the public API surface.
 *
 * @internal
 */
export declare function __resetSharedBtcAppKitConfigForTests(): void;
