weiToEther
weiToEther(
weiQuantity):string
Defined in: utils/wei-to-ether.ts:20
Convert from Wei to Ether
Similar to “formatEther” in ethers.js
Similar to “fromWei” in web3.js
Parameters
Section titled “Parameters”weiQuantity
Section titled “weiQuantity”string | number | bigint
the amount of wei to convert to ether
Returns
Section titled “Returns”string
a string decimal representation of ether equivalent to the specified wei
Example
Section titled “Example”weiToEther('1000000000000000000000')// '1000'weiToEther(1000000000000000000000)// '1000'