export * from './react'; import { Channel } from '../core/channels'; import { CapabilityDescriptor, EventName } from '../core/protocol'; import { ApnaNostrWithLegacy } from '../protocols/nostr'; import { ApnaIdentityDomain } from '../domains/identity'; import { ApnaSocialDomain } from '../domains/social'; import { ApnaPermissions } from '../interfaces/permissions'; import { ApnaWidgets } from '../interfaces/widgets'; import { ApnaBitcoin } from '../protocols/bitcoin'; import { ApnaEthereum } from '../protocols/ethereum'; export interface ApnaAppConfig { /** Stable id of this mini-app (its publisher-rooted identity / app id). */ appId: string; /** Explicit channel override. Omit to auto-detect (iframe vs host-extension). */ channel?: Channel; } /** * `ApnaApp` — the mini-app side of the bridge. * * Detects its channel, performs the handshake over the new `Bridge`, builds a * `Transport`, and exposes the host's capabilities. */ export declare class ApnaApp { readonly appId: string; readonly instanceId: string; /** Resolves once the handshake has completed and the transport is ready. */ readonly ready: Promise; /** Low-level Nostr protocol module. */ readonly nostr: ApnaNostrWithLegacy; /** High-level identity domain. Latest methods are mirrored at `.v1`. */ readonly identity: ApnaIdentityDomain; /** High-level social domain. Latest methods are mirrored at `.v1`. */ readonly social: ApnaSocialDomain; /** Client-side permissions convenience module. */ readonly permissions: ApnaPermissions; /** Mini-app authored widgets metadata module. */ readonly widgets: ApnaWidgets; /** Low-level Bitcoin module. Throws when the host does not support it. */ readonly bitcoin: ApnaBitcoin; /** Low-level Ethereum module. Throws when the host does not support it. */ readonly ethereum: ApnaEthereum; private readonly channel; private readonly bridge; private readonly eventListeners; private transport?; private capabilities; private httpEndpoint?; private designRemote?; constructor(config: ApnaAppConfig); /** Capability descriptors negotiated at handshake. */ getCapabilities(): CapabilityDescriptor[]; /** The host's design-component Module Federation remote, if advertised. */ getDesignRemote(): string | undefined; /** Tear down the bridge and channel. */ dispose(): void; /** Subscribe to typed host -> app events. */ on(event: EventName, handler: (payload: unknown) => void): () => void; private init; private readonly handleEvent; private callCapability; private callSupportedCapability; private getTransport; private subscribeCapability; private isCapabilitySupported; }