aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-31 17:26:20 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-10 18:24:35 +0800
commit9acb745956510b3e783a71e302ba4d5b1fe39daa (patch)
tree44764b61a29c2a73c4da73d30d258b2b243289b4
parent875edaf96f7162299455ee06b69ce406d5b2cb4e (diff)
downloaddexon-sol-tools-9acb745956510b3e783a71e302ba4d5b1fe39daa.tar.gz
dexon-sol-tools-9acb745956510b3e783a71e302ba4d5b1fe39daa.tar.zst
dexon-sol-tools-9acb745956510b3e783a71e302ba4d5b1fe39daa.zip
Add sendAsync types in provider
-rw-r--r--packages/web3-typescript-typings/index.d.ts20
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';