diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-06 11:33:42 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-06 11:33:42 +0800 |
commit | 5bbdb7a8f78cdaf110f2224eeac42262a2e2f678 (patch) | |
tree | 3da4455fb8983cf6b90c359322e5b610d6f7fd85 /packages/website/ts/globals.d.ts | |
parent | 3cf7cb105422f8c1a398f7e9e63190826daf8c09 (diff) | |
download | dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.tar dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.tar.gz dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.tar.bz2 dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.tar.lz dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.tar.xz dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.tar.zst dexon-sol-tools-5bbdb7a8f78cdaf110f2224eeac42262a2e2f678.zip |
Use subproviders subpackage in website and remove old subproviders
Diffstat (limited to 'packages/website/ts/globals.d.ts')
-rw-r--r-- | packages/website/ts/globals.d.ts | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/packages/website/ts/globals.d.ts b/packages/website/ts/globals.d.ts index c5b94dc45..46897b429 100644 --- a/packages/website/ts/globals.d.ts +++ b/packages/website/ts/globals.d.ts @@ -4,7 +4,6 @@ declare module 'es6-promisify'; declare module 'truffle-contract'; declare module 'ethereumjs-util'; declare module 'keccak'; -declare module 'web3-provider-engine'; declare module 'whatwg-fetch'; declare module 'react-html5video'; declare module 'web3-provider-engine/subproviders/filters'; @@ -22,6 +21,8 @@ declare module '*.json' { /* tslint:enable */ } +// tslint:disable:max-classes-per-file + // find-version declarations declare function findVersions(version: string): string[]; declare module 'find-versions' { @@ -132,21 +133,26 @@ declare class Subprovider {} declare module 'web3-provider-engine/subproviders/subprovider' { export = Subprovider; } - -// tslint:disable-next-line:max-classes-per-file -declare class RpcSubprovider { - constructor(options: {rpcUrl: string}); - public handleRequest(payload: any, next: any, end: (err?: Error, data?: any) => void): void; -} declare module 'web3-provider-engine/subproviders/rpc' { + import * as Web3 from 'web3'; + class RpcSubprovider { + constructor(options: {rpcUrl: string}); + public handleRequest( + payload: Web3.JSONRPCRequestPayload, next: () => void, end: (err: Error|null, data?: any) => void, + ): void; + } export = RpcSubprovider; } -// tslint:disable-next-line:max-classes-per-file -declare class HookedWalletSubprovider { - constructor(wallet: any); -} -declare module 'web3-provider-engine/subproviders/hooked-wallet' { - export = HookedWalletSubprovider; +declare module 'web3-provider-engine' { + class Web3ProviderEngine { + public on(event: string, handler: () => void): void; + public send(payload: any): void; + public sendAsync(payload: any, callback: (error: any, response: any) => void): void; + public addProvider(provider: any): void; + public start(): void; + public stop(): void; + } + export = Web3ProviderEngine; } declare interface Artifact { @@ -157,3 +163,5 @@ declare interface Artifact { }; }; } + +// tslint:enable:max-classes-per-file |