mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-08 03:00:02 +00:00
web3: added static utils property to the Web3 class
This commit is contained in:
2
types/web3/index.d.ts
vendored
2
types/web3/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user