aboutsummaryrefslogblamecommitdiffstats
path: root/packages/typescript-typings/types/web3-provider-engine/index.d.ts
blob: 8d5aef749ba95b442d4a232dcce7059f790220a2 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                       

                                                                                               
                                                            




                                                                                      





                                                









                                                                 
                                                                                     




                                                 
                                                                            










                                                                      
                                                                                     




                                           
                                                                            



                                
declare module 'web3-provider-engine' {
    import { Provider, JSONRPCRequestPayload, JSONRPCResponsePayload } from '@0xproject/types';
    class Web3ProviderEngine implements Provider {
        public on(event: string, handler: () => void): void;
        public send(payload: JSONRPCRequestPayload): void;
        public sendAsync(
            payload: JSONRPCRequestPayload,
            callback: (error: null | Error, response: JSONRPCResponsePayload) => void,
        ): void;
        public addProvider(provider: any): void;
        public start(): void;
        public 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';
// web3-provider-engine declarations
declare module 'web3-provider-engine/subproviders/subprovider' {
    class Subprovider {}
    export = Subprovider;
}
declare module 'web3-provider-engine/subproviders/rpc' {
    import { JSONRPCRequestPayload, JSONRPCResponsePayload } from '@0xproject/types';
    class RpcSubprovider {
        constructor(options: { rpcUrl: string });
        public handleRequest(
            payload: JSONRPCRequestPayload,
            next: () => void,
            end: (err: Error | null, data?: JSONRPCResponsePayload) => void,
        ): void;
    }
    export = RpcSubprovider;
}
declare module 'web3-provider-engine/util/rpc-cache-utils' {
    class ProviderEngineRpcUtils {
        public static blockTagForPayload(payload: any): string | null;
    }
    export = ProviderEngineRpcUtils;
}
declare module 'web3-provider-engine/subproviders/fixture' {
    import { JSONRPCRequestPayload, JSONRPCResponsePayload } from '@0xproject/types';
    class FixtureSubprovider {
        constructor(staticResponses: any);
        public handleRequest(
            payload: JSONRPCRequestPayload,
            next: () => void,
            end: (err: Error | null, data?: JSONRPCResponsePayload) => void,
        ): void;
    }
    export = FixtureSubprovider;
}