@json-rpc-tools/types
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -19,7 +19,9 @@ import { Schema } from "./schema"; | ||
} | ||
export interface JsonRpcRequest<T = any> { | ||
export interface RequestArguments<T = any> { | ||
method: string; | ||
params?: T; | ||
} | ||
export interface JsonRpcRequest<T = any> extends Required<RequestArguments<T>> { | ||
id: number; | ||
jsonrpc: string; | ||
method: string; | ||
params: T; | ||
} | ||
@@ -26,0 +28,0 @@ export interface JsonRpcResult<T = any> { |
@@ -1,2 +0,2 @@ | ||
import { JsonRpcPayload, JsonRpcRequest } from "./jsonrpc"; | ||
import { JsonRpcPayload, JsonRpcRequest, RequestArguments } from "./jsonrpc"; | ||
import { IEvents } from "./misc"; | ||
@@ -14,3 +14,4 @@ export declare abstract class IJsonRpcConnection extends IEvents { | ||
abstract disconnect(): Promise<void>; | ||
abstract request<Result = any, Params = any>(request: JsonRpcRequest<Params>): Promise<Result>; | ||
abstract request<Result = any, Params = any>(request: RequestArguments<Params>): Promise<Result>; | ||
protected abstract requestStrict<Result = any, Params = any>(request: JsonRpcRequest<Params>): Promise<Result>; | ||
} | ||
@@ -17,0 +18,0 @@ export declare abstract class IJsonRpcProvider extends IBaseJsonRpcProvider { |
{ | ||
"name": "@json-rpc-tools/types", | ||
"description": "Typings for JSON-RPC", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"author": "Pedro Gomes <github.com/pedrouid>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/pedrouid/json-rpc-tools/", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132824
378