IotaConverter
public class IotaConverter
Iota Converter utils, used to convert trytes, trits to/from String and other kinds of conversion.
-
Converts an ASCII string to Trytes.
Declaration
Swift
public static func trytes(fromAsciiString input: String) -> String?Parameters
inputAn ASCII String.
Return Value
Trytes as String if the input is valid,
nilotherwise. -
Converts Trytes to ASCII string.
Declaration
Swift
public static func asciiString(fromTrytes inputTrytes: String) -> String?Parameters
inputTrytesTrytes as String.
Return Value
ASCII String if the input is valid,
nilotherwise. -
Converts an Array of Trits to String.
Declaration
Swift
public static func string(fromTrits trits: [Int]) -> StringParameters
tritsAn Array of Trits.
Return Value
A String from Trits.
-
Converts a String to an Array of Trits.
Declaration
Swift
public static func trits(fromString string: String) -> [Int]Parameters
stringA valid String, all the invalid characters will be skipped.
Return Value
An Array of Trits.
IotaConverter Class Reference