Structures

The following structures are available globally.

  • Declaration

    Swift

    public struct Base58
  • A set of Base58Check coding methods.

    // Encode bytes to address
    let address = Base58Check.encode([versionByte] + pubkeyHash)
    
    // Decode address to bytes
    guard let payload = Base58Check.decode(address) else {
        // Invalid checksum or Base58 coding
        throw SomeError()
    }
    let versionByte = payload[0]
    let pubkeyHash = payload.dropFirst()
    
    See more

    Declaration

    Swift

    public struct Base58Check
  • HD

    A struct used to provide a number of functions needed to handle derivation paths and derive nodes for creating HD key pairs

    See more

    Declaration

    Swift

    public struct HD
  • A struct representing a both a PrivateKey and PublicKey with helper methods to create various kinds

    See more

    Declaration

    Swift

    public struct KeyPair
  • A list of words which can generate a private key.

    See more

    Declaration

    Swift

    public struct Mnemonic : Equatable, Codable
  • A struct representing a PrivateKey

    See more

    Declaration

    Swift

    public struct PrivateKey : Codable
    extension PrivateKey: CustomStringConvertible
    extension PrivateKey: Equatable
  • A struct representing a PublicKey

    See more

    Declaration

    Swift

    public struct PublicKey : Codable
    extension PublicKey: CustomStringConvertible
    extension PublicKey: Equatable