web3: added static utils property to the Web3 class

This commit is contained in:
Konstantin Melnikov
2018-08-08 13:04:58 +03:00
parent 2025fc00e6
commit 5ec01c736b
2 changed files with 3 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
// André Vitor de Lima Matos <https://github.com/andrevmatos>
// Levin Keller <https://github.com/levino>
// Dmitry Radkovskiy <https://github.com/zlumer>
// Konstantin Melnikov <https://github.com/archangel-irk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import BigNumber = require("bn.js");
@@ -34,6 +35,7 @@ declare class Web3 {
Shh: new (provider: Provider) => Shh;
Bzz: new (provider: Provider) => Bzz;
};
static utils: Utils;
constructor(provider?: Provider | string);
version: string;
BatchRequest: new () => BatchRequest;

View File

@@ -20,3 +20,4 @@ myContract.options.gas = 5000000;
const weiStr: string = web3.utils.toWei("100", "gwei");
const weiBn: BigNumber = web3.utils.toWei(web3.utils.toBN("1"));
const rndHex: string = Web3.utils.randomHex(10);