Units
For units conversion, Kaia-sdk supports utils for converting kaia
, Gkei
and kei
. See supported units .
Import the KaiaConvert
from org.web3j.utils.KaiaConvert packages
To convert other units to kaia, use KaiaConvert.fromKei
. The first param is the value and the second param is the unit types of kei/Gkei/kaia
To convert other units to kei, use KaiaConvert.toKei
. The first param is the value and the second param is the unit types of kei/Gkei/kaia