diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-03 21:19:38 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-04 16:56:32 +0800 |
commit | 249bf0163d8ee71b7329fd58b72e554c0324279c (patch) | |
tree | 5bfb30b082236bd089e35186220bdb02913ba128 /packages/typescript-typings/types/web3/index.d.ts | |
parent | 674e56cea69fe96ddd0071d3c4c5b5ea8ae299bf (diff) | |
download | dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.gz dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.bz2 dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.lz dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.xz dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.tar.zst dexon-0x-contracts-249bf0163d8ee71b7329fd58b72e554c0324279c.zip |
Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/typescript-typings/types/web3/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/web3/index.d.ts | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/packages/typescript-typings/types/web3/index.d.ts b/packages/typescript-typings/types/web3/index.d.ts index f4ebd41b9..15e7575a8 100644 --- a/packages/typescript-typings/types/web3/index.d.ts +++ b/packages/typescript-typings/types/web3/index.d.ts @@ -6,6 +6,7 @@ declare module 'web3' { BlockWithoutTransactionData, BlockParam, CallData, + Provider, Unit, TxData, Transaction, @@ -21,17 +22,17 @@ declare module 'web3' { class Web3 { public static providers: typeof providers; - public currentProvider: Web3.Provider; + public currentProvider: Provider; public eth: Web3.EthApi; public personal: Web3.PersonalApi | undefined; public version: Web3.VersionApi; public net: Web3.NetApi; - public constructor(provider?: Web3.Provider); + public constructor(provider?: Provider); public isConnected(): boolean; - public setProvider(provider: Web3.Provider): void; + public setProvider(provider: Provider): void; public reset(keepIsSyncing: boolean): void; public toHex(data: MixedData): string; public toAscii(hex: string): string; @@ -49,7 +50,7 @@ declare module 'web3' { } namespace providers { - class HttpProvider implements Web3.Provider { + class HttpProvider implements Provider { constructor(url?: string, timeout?: number, username?: string, password?: string); public sendAsync( payload: JSONRPCRequestPayload, @@ -77,13 +78,6 @@ declare module 'web3' { stopWatching(callback?: () => void): void; } - interface Provider { - sendAsync( - payload: JSONRPCRequestPayload, - callback: (err: Error, result: JSONRPCResponsePayload) => void, - ): void; - } - interface Sha3Options { encoding: 'hex'; } |