diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-09 01:22:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 01:22:25 +0800 |
commit | 828dffffedf64e7ab5301284e2586082b6bc8f9c (patch) | |
tree | 6f429e6f2b3050de6dd7ce16e42c7f387bd5018a /packages/website/ts/globals.d.ts | |
parent | 5eea829be9f5e8669c40dac965231051b668ed37 (diff) | |
parent | af8d24d0eb5af781f4731b5559979f2b02579785 (diff) | |
download | dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.tar dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.tar.gz dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.tar.bz2 dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.tar.lz dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.tar.xz dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.tar.zst dexon-sol-tools-828dffffedf64e7ab5301284e2586082b6bc8f9c.zip |
Merge pull request #252 from 0xProject/feature/addSubproviders
Add Subproviders Subpackage
Diffstat (limited to 'packages/website/ts/globals.d.ts')
-rw-r--r-- | packages/website/ts/globals.d.ts | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/packages/website/ts/globals.d.ts b/packages/website/ts/globals.d.ts index 7bbbb3a98..b4611f583 100644 --- a/packages/website/ts/globals.d.ts +++ b/packages/website/ts/globals.d.ts @@ -3,7 +3,6 @@ declare module 'react-router-hash-link'; 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'; @@ -21,6 +20,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' { @@ -131,21 +132,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 { |