import type { DappStatus } from './status.ts'; export declare const DappSessionStatusErrorCode: { readonly identityChanged: "dapp-session.status-identity-changed"; readonly notReady: "dapp-session.status-not-ready"; }; export type DappSessionStatusErrorCode = typeof DappSessionStatusErrorCode[keyof typeof DappSessionStatusErrorCode]; /** A ready actor/provider system whose ownership is transferred to the dApp session. */ export interface DappOwnedSystemSession { stop(): Promise; whenTerminal(): Promise; } /** Dapp-kit-owned request/effect work that must close and drain before actors stop. */ export interface DappSessionWorkOwner { close(): void; drain(): Promise; } export interface DappSessionWorkBinding { close(): Promise; } export interface CreateDappSessionOptions { readonly ports: TPorts; readonly readStatus: () => DappStatus; readonly system: DappOwnedSystemSession; readonly work?: DappSessionWorkOwner; } export interface DappSession>> { readonly ports: TPorts; bindWork(create: () => DappSessionWorkOwner): DappSessionWorkBinding; status(): DappStatus; stop(): Promise; whenTerminal(): Promise; } export declare class DappSessionStatusError extends Error { readonly code: DappSessionStatusErrorCode; constructor(code: DappSessionStatusErrorCode, message: string); } export declare function createDappSession(options: CreateDappSessionOptions): DappSession; //# sourceMappingURL=dappSession.d.ts.map