diff options
-rw-r--r-- | packages/web3-typescript-typings/index.d.ts | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts index 2f2cfa4b6..2f89941a3 100644 --- a/packages/web3-typescript-typings/index.d.ts +++ b/packages/web3-typescript-typings/index.d.ts @@ -94,7 +94,25 @@ declare module 'web3' { stopWatching(callback: () => void): void; } - interface Provider {} + export interface JSONRPCRequestPayload { + params: any[]; + method: string; + id: number; + jsonrpc: string; + } + + export interface JSONRPCResponsePayload { + result: any; + id: number; + jsonrpc: string; + } + + interface Provider { + sendAsync( + payload: JSONRPCRequestPayload, + callback: (err: Error, result: JSONRPCResponsePayload) => void, + ); + } interface Sha3Options { encoding: 'hex'; |