UNPKG

@liskhq/lisk-api-client

Version:
12 lines (11 loc) 565 B
import { JSONRPCError, JSONRPCMessage, JSONRPCNotification } from './types'; export declare const convertRPCError: (error: JSONRPCError) => Error; export declare const promiseWithTimeout: <T = void>(promises: Promise<T>[], ms: number, message?: string) => Promise<T>; interface Defer<T> { promise: Promise<T>; resolve: (result: T) => void; reject: (error?: Error) => void; } export declare const defer: <T>() => Defer<T>; export declare const messageIsNotification: <T = unknown>(input: JSONRPCMessage<T>) => input is JSONRPCNotification<T>; export {};