Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 857 Bytes

eth-connect.towei.md

File metadata and controls

27 lines (16 loc) · 857 Bytes

Home > eth-connect > toWei

toWei() function

Takes a number of a unit and converts it to wei.

Possible units are: SI Short SI Full Effigy Other - kwei femtoether babbage - mwei picoether lovelace - gwei nanoether shannon nano - -- microether szabo micro - -- milliether finney milli - ether -- -- - kether -- grand - mether - gether - tether

Signature:

export declare function toWei(num: number | string, unit: Unit): string | BigNumber;

Parameters

Parameter Type Description
num number | string
unit Unit

Returns:

string | BigNumber