Installation
npm install --save @types/web3-provider-engine
Summary
This package contains type definitions for web3-provider-engine (https://github.com/MetaMask/provider-engine#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web3-provider-engine.
import { JSONRPCRequestPayload, JSONRPCResponsePayload, Provider } from "ethereum-protocol";
interface Web3ProviderEngineOptions {
pollingInterval?: number | undefined;
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(callback?: () => void): void;
stop(): void;
}
export = Web3ProviderEngine;
Additional Details
Credits
These definitions were written by Leonid Logvinov.