IotaInputValidator

public struct IotaInputValidator

Input validator for IOTA client.

  • Checks for a valid address.

    Declaration

    Swift

    public static func isAddress(address: String) -> Bool

    Parameters

    address

    The address.

    Return Value

    true if is a valid address, false otherwise.

  • Checks for a valid seed.

    Declaration

    Swift

    public static func isSeed(seed string: String) -> Bool

    Parameters

    string

    A seed.

    Return Value

    true if is a valid seed, false otherwise.

  • Checks for a valid trytes string.

    Declaration

    Swift

    public static func isTrytes(trytes: String) -> Bool

    Parameters

    trytes

    Trytes.

    Return Value

    true if is a valid input, false otherwise.

  • Checks for a valid hash.

    Declaration

    Swift

    public static func isHash(hash: String) -> Bool

    Parameters

    hash

    An hash string.

    Return Value

    true if is a valid hash, false otherwise.

  • Checks if is an empty trytes

    Declaration

    Swift

    public static func isNinesTrytes(trytes: String) -> Bool

    Parameters

    trytes

    Trytes.

    Return Value

    true if is a valid string, false otherwise.