lisk-framework
Version:
Lisk blockchain application platform
13 lines (12 loc) • 532 B
TypeScript
import { NotificationRequest } from './jsonrpc';
export type EventCallback = (data?: Record<string, unknown>) => void | Promise<void>;
export type EventsDefinition = ReadonlyArray<string>;
export declare class Event {
readonly module: string;
readonly name: string;
readonly data?: Record<string, unknown>;
constructor(name: string, data?: Record<string, unknown>);
static fromJSONRPCNotification(data: NotificationRequest | string): Event;
toJSONRPCNotification(): NotificationRequest;
key(): string;
}