diff options
Diffstat (limited to 'packages/typescript-typings')
-rw-r--r-- | packages/typescript-typings/CHANGELOG.json | 8 | ||||
-rw-r--r-- | packages/typescript-typings/types/web3-provider-engine/index.d.ts | 10 |
2 files changed, 15 insertions, 3 deletions
diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index a2081e3b9..9c78c538a 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -3,8 +3,12 @@ "version": "0.4.2", "changes": [ { - "note": "Additional error type for `ethers.js`", - "pr": 763 + "note": "Improve 'web3-provider-engine' typings", + "pr": 768 + }, + { + "note": "Additional error type for `ethers.js`", + "pr": 763 } ] }, diff --git a/packages/typescript-typings/types/web3-provider-engine/index.d.ts b/packages/typescript-typings/types/web3-provider-engine/index.d.ts index 1733f2731..72ef434a7 100644 --- a/packages/typescript-typings/types/web3-provider-engine/index.d.ts +++ b/packages/typescript-typings/types/web3-provider-engine/index.d.ts @@ -1,6 +1,12 @@ declare module 'web3-provider-engine' { import { Provider, JSONRPCRequestPayload, JSONRPCResponsePayload } from 'ethereum-types'; + interface Web3ProviderEngineOptions { + pollingInterval?: number; + blockTracker?: any; + blockTrackerProvider?: any; + } class Web3ProviderEngine implements Provider { + constructor(options?: Web3ProviderEngineOptions); public on(event: string, handler: () => void): void; public send(payload: JSONRPCRequestPayload): void; public sendAsync( @@ -8,7 +14,9 @@ declare module 'web3-provider-engine' { callback: (error: null | Error, response: JSONRPCResponsePayload) => void, ): void; public addProvider(provider: any): void; - public start(): void; + // start block polling + public start(callback?: () => void): void; + // stop block polling public stop(): void; } export = Web3ProviderEngine; |