diff options
author | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 14:50:42 +0800 |
---|---|---|
committer | Hsuan Lee <boczeratul@gmail.com> | 2019-03-06 14:50:42 +0800 |
commit | d20e81c449a717a79e1a78f83963cf64fbcddfd7 (patch) | |
tree | 57cf4d159ce6c8c83822656e83b78aae258e3448 /packages/typescript-typings/types/web3-provider-engine/index.d.ts | |
parent | 089d04de844a776df3c4095db22039a929ed3d65 (diff) | |
download | dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.tar dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.tar.gz dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.tar.bz2 dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.tar.lz dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.tar.xz dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.tar.zst dexon-sol-tools-d20e81c449a717a79e1a78f83963cf64fbcddfd7.zip |
Add type definitions to web3-provider-engine
Diffstat (limited to 'packages/typescript-typings/types/web3-provider-engine/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/web3-provider-engine/index.d.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/packages/typescript-typings/types/web3-provider-engine/index.d.ts b/packages/typescript-typings/types/web3-provider-engine/index.d.ts new file mode 100644 index 000000000..41130f38f --- /dev/null +++ b/packages/typescript-typings/types/web3-provider-engine/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for web3-provider-engine 14.0 +// Project: https://github.com/MetaMask/provider-engine#readme +// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon> +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +declare module '@dexon-foundation/web3-provider-engine' { + import { + Provider, + JSONRPCRequestPayload, + JSONRPCResponsePayload + } from "ethereum-protocol"; + interface Web3ProviderEngineOptions { + pollingInterval?: number; + blockTracker?: any; + blockTrackerProvider?: any; + } + declare class Web3ProviderEngine implements Provider { + constructor(options?: Web3ProviderEngineOptions); + on(event: string, handler: () => void): void; + send(payload: JSONRPCRequestPayload): void; + sendAsync( + payload: JSONRPCRequestPayload, + callback: ( + error: null | Error, + response: JSONRPCResponsePayload + ) => void + ): void; + addProvider(provider: any): void; + // start block polling + start(callback?: () => void): void; + // stop block polling + stop(): void; + } + export = Web3ProviderEngine; +} +// declare module "web3-provider-engine/subproviders/nonce-tracker"; +// declare module "web3-provider-engine/subproviders/hooked-wallet"; +// declare module "web3-provider-engine/subproviders/filters"; |