import * as oasis from '@oasisprotocol/client'; export declare function toKey(module: string, code: number): Uint8Array; export type Handler = (e: oasis.types.RuntimeClientEvent, value: V) => void; export type ModuleHandler = [module: string, codes: { [code: number]: Handler; }]; export declare class Visitor { handlers: { [keyHex: string]: Handler; }; constructor(modules: ModuleHandler[]); /** * Calls one of the handlers based on a given event's key. * @param e The event * @returns `true` if the event matched one of the handlers */ visit(e: oasis.types.RuntimeClientEvent): boolean; }