This page uses machine translation from English, which may contain errors or unclear language. For the most accurate information, please see the original English version. Some content may be in the original English due to frequent updates. Help us improve this page's translation by joining our effort on Crowdin. (Crowdin translation page, Contributing guide)
Units
For units conversion, Kaia-sdk supports utils for converting kaia
, Gkei
and kei
. See supported units .
Import the formatKlay
, parseKlay
, formatKlayUnits
, from @kaiachain/ethers-ext packages
To convert peb to other units, use formatKlayUnits
. For example, using formatKlayUnits
converting peb to ston
Using formatKlay
converts peb to klay
Using parseKlayUnits
to convert value from one unit to peb. The first param is the value, the second param is the unit to be converted
Using parseKlay
to convert klay to peb