From 5ec01c736b53863f63eca97f962f064bdb2a8752 Mon Sep 17 00:00:00 2001 From: Konstantin Melnikov Date: Wed, 8 Aug 2018 13:04:58 +0300 Subject: [PATCH] web3: added static utils property to the Web3 class --- types/web3/index.d.ts | 2 ++ types/web3/web3-tests.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/types/web3/index.d.ts b/types/web3/index.d.ts index c93e9c2ebd..9ddbc7a00b 100644 --- a/types/web3/index.d.ts +++ b/types/web3/index.d.ts @@ -14,6 +14,7 @@ // André Vitor de Lima Matos // Levin Keller // Dmitry Radkovskiy +// Konstantin Melnikov // 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; diff --git a/types/web3/web3-tests.ts b/types/web3/web3-tests.ts index 85e4bc9b0a..fc4be8534a 100644 --- a/types/web3/web3-tests.ts +++ b/types/web3/web3-tests.ts @@ -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);