Crypto

public struct Crypto

Undocumented

  • Generate public and private keys from a given secret

    Declaration

    Swift

    public static func keys(fromSecret secret: String) throws -> (publicKey: String, privateKey: String)
  • Generate key pair from a given secret

    Declaration

    Swift

    public static func keyPair(fromSecret secret: String) throws -> KeyPair
  • Extract Lisk address from a public key

    Declaration

    Swift

    public static func address(fromPublicKey publicKey: String) -> String
  • Epoch time relative to genesis block

    Declaration

    Swift

    public static func timeIntervalSinceGenesis(offset: TimeInterval = 0) -> UInt32
  • Multiplies a given amount by Lisk fixed point

    Declaration

    Swift

    public static func fixedPoint(amount: Double) -> UInt64