PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/viem/_esm/utils/unit
Просмотр файла: formatEther.js
import { etherUnits } from '../../constants/unit.js';
import { formatUnits } from './formatUnits.js';
/**
* Converts numerical wei to a string representation of ether.
*
* - Docs: https://viem.sh/docs/utilities/formatEther
*
* @example
* import { formatEther } from 'viem'
*
* formatEther(1000000000000000000n)
* // '1'
*/
export function formatEther(wei, unit = 'wei') {
return formatUnits(wei, etherUnits[unit]);
}
//# sourceMappingURL=formatEther.js.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!