IotaUnitsConverter
public struct IotaUnitsConverter
Utils for unit conversion.
-
Converts from Iota to the specified unit.
Declaration
Swift
public static func convert(amount: UInt64, toUnit unit: IotaUnits) -> DoubleParameters
amountThe amount in Iota.
unitThe final unit.
Return Value
The value in the specified unit.
-
Converts Iota amount to human readable string.
Declaration
Swift
public static func iotaToString(amount: UInt64, extended: Bool = false, forceUnit: IotaUnits? = nil) -> StringParameters
amountThe amount.
extendedIf
true, will return the extended string.forceUnitAn arbitrary unit.
Return Value
The string that represents the value and unit.
IotaUnitsConverter Structure Reference