@airswap/jsonrpc-client-websocket
Version:
JSON-RPC over WebSockets
27 lines (26 loc) • 590 B
TypeScript
export declare enum JsonRpcErrorCodes {
PARSE_ERROR = -32700,
INVALID_REQUEST = -32600,
METHOD_NOT_FOUND = -32601,
INVALID_PARAMS = -32602,
INTERNAL_ERROR = -32603,
INVALID_RESPONSE = -32001,
REQUEST_TIMEOUT = -32002
}
export declare class JsonRpcError {
code: number;
message: string;
data?: any;
}
export declare class JsonRpcResponse {
jsonrpc: string;
id: number | any;
result?: any;
error?: JsonRpcError;
}
export declare class JsonRpcRequest {
jsonrpc: string;
id?: number | any;
method: string;
params?: any;
}