KeyDeriving

public protocol KeyDeriving

Undocumented

  • Given a seed and a number of accounts, return the associated viewing keys.

    Declaration

    Swift

    func deriveViewingKeys(seed: [UInt8], numberOfAccounts: Int) throws -> [String]

    Parameters

    seed

    the seed from which to derive viewing keys.

    numberOfAccounts

    the number of accounts to use. Multiple accounts are not fully supported so the default value of 1 is recommended.

    Return Value

    the viewing keys that correspond to the seed, formatted as Strings.

  • Given a spending key, return the associated viewing key.

    Declaration

    Swift

    func deriveViewingKey(spendingKey: String) throws -> String

    Parameters

    spendingKey

    the key from which to derive the viewing key.

    Return Value

    the viewing key that corresponds to the spending key.

  • Given a seed and a number of accounts, return the associated spending keys.

    Declaration

    Swift

    func deriveSpendingKeys(seed: [UInt8], numberOfAccounts: Int) throws -> [String]

    Parameters

    seed

    the seed from which to derive spending keys.

    numberOfAccounts

    the number of accounts to use. Multiple accounts are not fully supported so the default value of 1 is recommended.

    Return Value

    the spending keys that correspond to the seed, formatted as Strings.

  • Given a seed and account index, return the associated address.

    Declaration

    Swift

    func deriveShieldedAddress(seed: [UInt8], accountIndex: Int) throws -> String

    Parameters

    seed

    the seed from which to derive the address.

    accountIndex

    the index of the account to use for deriving the address. Multiple accounts are not fully supported so the default value of 1 is recommended.

    Return Value

    the address that corresponds to the seed and account index.

  • Given a viewing key string, return the associated address.

    Declaration

    Swift

    func deriveShieldedAddress(viewingKey: String) throws -> String

    Parameters

    viewingKey

    the viewing key to use for deriving the address. The viewing key is tied to a specific account so no account index is required.

    Return Value

    the address that corresponds to the viewing key.

  • Derives a transparent address from seedbytes, specifying account and index

    Declaration

    Swift

    func deriveTransparentAddress(seed: [UInt8], account: Int, index: Int) throws -> String
  • Derives a SecretKey to spend transparent funds from a transparent secret key wif encoded

    Declaration

    Swift

    func deriveTransparentPrivateKey(seed: [UInt8], account: Int, index: Int) throws -> String
  • Derives a transparent address from the given transparent Secret Key

    Declaration

    Swift

    func deriveTransparentAddressFromPrivateKey(_ tsk: String) throws -> String
  • Undocumented

    Declaration

    Swift

    func deriveTransparentAddressFromPublicKey(_ pubkey: String) throws -> String
  • derives unified viewing keys from seedbytes, specifying a number of accounts

    Declaration

    Swift

    func deriveUnifiedViewingKeysFromSeed(_ seed: [UInt8], numberOfAccounts: Int) throws -> [UnifiedViewingKey]
  • derives a Unified Address from a Unified Viewing Key

    Declaration

    Swift

    func deriveUnifiedAddressFromUnifiedViewingKey(_ uvk: UnifiedViewingKey) throws -> UnifiedAddress