import type { GenericError, ProductId } from "@parity/truapi"; import type { RequiredHostCallbacks } from "./host-callbacks.js"; import type { ChainConnect } from "../runtime.js"; /** * Byte-oriented callback surface the WASM core invokes. Members of an * optional capability are absent when the host omits the capability; * the core then answers the matching product calls with `Unsupported`. */ export interface RawCallbacks { authStateChanged(state: Uint8Array): void; chainConnect: ChainConnect; createChatRoom?(product: Uint8Array, request: Uint8Array): Promise; registerChatBot?(product: Uint8Array, request: Uint8Array): Promise; postChatMessage?(product: Uint8Array, request: Uint8Array): Promise; setChatRoomFooter?(product: Uint8Array, request: Uint8Array): Promise; subscribeChatRooms?(product: Uint8Array, sendItem: (item?: Uint8Array) => void, sendError: (error: GenericError) => void): (() => void) | void; contacts?(lookup: Uint8Array): Promise; pickContact?(product: Uint8Array): Promise; contactUsernames?(product: Uint8Array): Promise; readCoreStorage(key: Uint8Array): Promise; writeCoreStorage(key: Uint8Array, value: Uint8Array): Promise; clearCoreStorage(key: Uint8Array): Promise; transactionExtensionVersions(): Promise; featureSupported(request: Uint8Array): Promise; scheduleGameReminder?(product: Uint8Array, startsAt: bigint): Promise; cancelGameReminder?(product: Uint8Array): Promise; subscribeLocale(sendItem: (item?: Uint8Array) => void, sendError: (error: GenericError) => void): (() => void) | void; navigateTo(url: string): Promise; pushNotification(notification: Uint8Array): Promise; cancelNotification(id: number): Promise; devicePermissionStatus?(request: Uint8Array): Promise; devicePermission(product: Uint8Array, request: Uint8Array): Promise; remotePermission(product: Uint8Array, request: Uint8Array): Promise; subscribePocketCards?(product: Uint8Array, sendItem: (item?: Uint8Array) => void, sendError: (error: GenericError) => void): (() => void) | void; removePocketCard?(product: Uint8Array, request: Uint8Array): Promise; lookupPreimage(key: Uint8Array, sendItem: (item?: Uint8Array) => void, sendError: (error: GenericError) => void): (() => void) | void; beginOperation(product: Uint8Array, label: string): Promise; endOperation(product: Uint8Array, id: number): Promise; read(key: string): Promise; write(key: string, value: Uint8Array): Promise; clear(key: string): Promise; clearProduct(productId: ProductId): Promise; subscribeStorage(key: string, sendItem: (item?: Uint8Array) => void, sendError: (error: GenericError) => void): (() => void) | void; scanCode?(product: Uint8Array, request: Uint8Array): Promise; subscribeTheme(sendItem: (item?: Uint8Array) => void, sendError: (error: GenericError) => void): (() => void) | void; confirmPermission(review: Uint8Array): Promise; confirmUserAction(review: Uint8Array): Promise; } /** Adapt typed host callbacks into the raw SCALE callback surface the * WASM core invokes. */ export declare function createWasmRawCallbacks(callbacks: RequiredHostCallbacks): RawCallbacks;