Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Initializer

init(seedRepresentation:publicKey:)

iOS 26.0+ macOS 26.0+ tvOS 26.0+ watchOS 26.0+
Creates a private key from the seed it is derived from.
init<D>(seedRepresentation: D, publicKey: Self.PublicKey?) throws where D : DataProtocol

Parameters

seedRepresentation

The 32-byte seed the private key is derived from.

publicKey

An optional public key to check the derived key against.

Discussion

Throws

If the seed isn’t valid, or if the provided public key doesn’t match the derived one.