Skip to content

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

string | number | bigint

the amount of wei to convert to ether

string

a string decimal representation of ether equivalent to the specified wei

weiToEther('1000000000000000000000')
// '1000'
weiToEther(1000000000000000000000)
// '1000'