export type UnlockMethod = { id: string; name: string; description?: string; }; export type SDKEvent = { type: 'state'; value: 'IDLE' | 'CHECKING_GRANT' | 'AWAITING_GRANT' | 'UNLOCKING' | 'AWAITING_UNLOCK' | 'FETCHING' | 'READY' | 'ERROR'; } | { type: 'error'; code: string; message: string; } | { type: 'error:ui'; code: string; message: string; } | { type: 'password:prompt'; prompt: string; reqId: string; } | { type: 'unlock:requested'; methods: UnlockMethod[]; } | { type: 'grant:requested'; requested: string[]; current?: string[]; manifests?: any[]; } | { type: 'devicekey:request'; deviceId: string; reqId: string; } | { type: 'devicestore:get'; key: string; reqId: string; } | { type: 'devicestore:set'; key: string; value: string; reqId: string; } | { type: 'devicestore:delete'; key: string; reqId: string; } | { type: 'sshkey:request'; keyId: string; reqId: string; }; type Listener = (e: SDKEvent) => void; export declare const bus: { on(fn: Listener): () => void; emit(e: SDKEvent): void; }; export declare function makeReqId(): string; export declare function waitPassword(reqId: string): Promise; export declare function replyPassword(reqId: string, value: string): void; export declare function cancelPassword(reqId: string, err?: Error): void; export declare function waitUnlock(): Promise; export declare function replyUnlock(methodId: string): void; export declare function cancelUnlock(err?: Error): void; export declare function waitGrant(): Promise; export declare function approveGrant(): void; export declare function denyGrant(err?: Error): void; export declare function waitDeviceKey(reqId: string): Promise; /** Preferred: pass Uint8Array; string is treated as base64url and decoded */ export declare function replyDeviceKey(reqId: string, key: Uint8Array | string): void; export declare function cancelDeviceKey(reqId: string, err?: Error): void; export declare function waitDeviceStoreGet(reqId: string): Promise; export declare function replyDeviceStoreGet(reqId: string, value: string | null): void; export declare function cancelDeviceStoreGet(reqId: string, err?: Error): void; export declare function waitDeviceStoreSet(reqId: string): Promise; export declare function ackDeviceStoreSet(reqId: string): void; export declare function rejectDeviceStoreSet(reqId: string, err?: Error): void; export declare function waitDeviceStoreDelete(reqId: string): Promise; export declare function ackDeviceStoreDelete(reqId: string): void; export declare function rejectDeviceStoreDelete(reqId: string, err?: Error): void; export type SSHKeyPayload = { privateKey: string; passphrase?: string; }; export declare function waitSshKey(reqId: string): Promise; export declare function replySshKey(reqId: string, payload: SSHKeyPayload): void; export declare function cancelSshKey(reqId: string, err?: Error): void; export {}; //# sourceMappingURL=bus.d.ts.map