IotaChecksum
public struct IotaChecksum
IOTA Checksum utils.
-
Calculates the checksum for an address.
Declaration
Swift
public static func calculateChecksum(address: String) -> String
Parameters
address
The address.
Return Value
The checksum.
-
Removes the checksum from an address.
Declaration
Swift
public static func removeChecksum(address: String) -> String?
Parameters
address
A valid address with checksum.
Return Value
The address without the checksum if is a valid address,
nil
otherwise. -
Removes the checksum from an address. NB: The address will be not verified.
Declaration
Swift
public static func removeChecksumFromAddress(_ address: String) -> String
Parameters
address
A valid address.
Return Value
The address without the checksum.
-
Checks if an address contains a valid checksum.
Declaration
Swift
public static func isValidChecksum(address: String) -> Bool
Parameters
address
The address.
Return Value
true
if is a valid checksum,false
otherwise. -
Checks if is an address with checksum.
Declaration
Swift
public static func isAddressWithChecksum(address: String) -> Bool
Parameters
address
The address.
Return Value
true
if is an address with checksum,false
otherwise. -
Checks if is an address without checksum.
Declaration
Swift
public static func isAddressWithoutChecksum(address: String) -> Bool
Parameters
address
The address.
Return Value
true
if is an address without checksum,false
otherwise.