export type OfficialModuleStateBridgeBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope";
export type OfficialModuleStateBridgeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_MODULE_ID" | "MISSING_MODULE_KIND" | "MISSING_STATE_SOURCE" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "MODULE_NOT_MOUNTED";
export type OfficialModuleStateBridgeGate = {
    accepted: boolean;
    reason?: string;
};
export type OfficialModuleStateBridgeRequest = {
    runtimeId?: string;
    moduleId?: string;
    moduleKind?: string;
    runtimeReady?: boolean;
    mountedModuleIds?: readonly string[];
    visibleState?: Readonly<Record<string, unknown>>;
    requestedStateKeys?: readonly string[];
    contract?: OfficialModuleStateBridgeGate;
    governance?: OfficialModuleStateBridgeGate;
    traceId?: string;
};
export type OfficialModuleStateView = {
    runtimeId: string;
    moduleId: string;
    moduleKind: string;
    ready: true;
    traceId?: string;
    exposedKeys: readonly string[];
    state: Readonly<Record<string, unknown>>;
    readonly: true;
    unsafeSideEffects: false;
};
export type OfficialModuleStateBridgeError = {
    code: OfficialModuleStateBridgeErrorCode;
    message: string;
    boundary: OfficialModuleStateBridgeBoundary;
    publicSafe: true;
};
export type OfficialModuleStateBridgeResult = {
    ok: true;
    view: OfficialModuleStateView;
    events: readonly string[];
} | {
    ok: false;
    error: OfficialModuleStateBridgeError;
    events: readonly string[];
};
export declare function createOfficialModuleStateBridge(request?: OfficialModuleStateBridgeRequest): OfficialModuleStateBridgeResult;
