Home > eth-connect > toWei
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;
Parameter | Type | Description |
---|---|---|
num | number | string | |
unit | Unit |
Returns:
string | BigNumber