UNPKG

2.22 kBTypeScriptView Raw
1// Type definitions for web3 1.0
2// Project: https://github.com/ethereum/web3.js
3// Definitions by: Simon Jentzsch <https://github.com/simon-jentzsch>
4// Nitzan Tomer <https://github.com/nitzantomer>
5// Zurbo <https://github.com/zurbo>
6// Xiao Liang <https://github.com/yxliang01>
7// Francesco Soncina <https://github.com/phra>
8// Nick Addison <https://github.com/naddison36>
9// Ícaro Harry <https://github.com/icaroharry>
10// Linus Norton <https://github.com/linusnorton>
11// Javier Peletier <https://github.com/jpeletier>
12// HIKARU KOBORI <https://github.com/anneau>
13// Baris Gumustas <https://github.com/matrushka>
14// André Vitor de Lima Matos <https://github.com/andrevmatos>
15// Levin Keller <https://github.com/levino>
16// Dmitry Radkovskiy <https://github.com/zlumer>
17// Konstantin Melnikov <https://github.com/archangel-irk>
18// Asgeir Sognefest <https://github.com/sogasg>
19// Donam Kim <https://github.com/donamk>
20// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
21// TypeScript Version: 2.4
22
23import Providers, { Provider } from "./providers";
24import { Bzz, Shh } from "./types";
25import { BatchRequest, Net, Personal } from "./eth/types";
26import Utils from "./utils";
27import Eth from "./eth/index";
28
29declare class Web3 {
30 static providers: Providers;
31 static givenProvider: Provider;
32 static modules: {
33 Eth: new (provider: Provider) => Eth;
34 Net: new (provider: Provider) => Net;
35 Personal: new (provider: Provider) => Personal;
36 Shh: new (provider: Provider) => Shh;
37 Bzz: new (provider: Provider) => Bzz;
38 };
39 static utils: Utils;
40 constructor(provider?: Provider | string);
41 version: string;
42 BatchRequest: new () => BatchRequest;
43 extend(methods: any): any; // TODO
44 bzz: Bzz;
45 currentProvider: Provider;
46 eth: Eth;
47 shh: Shh;
48 givenProvider: Provider;
49 providers: Providers;
50 setProvider(provider: Provider): void;
51 utils: Utils;
52}
53
54export = Web3;