Initializer
init(dataRepresentation:)
Creates a secp256k1 Schnorr private key from a 32-byte raw scalar.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
init<D>(dataRepresentation data: D) throws where D : ContiguousBytes
Parameters
-
data
-
Exactly 32 bytes representing the private key scalar; must pass secp256k1_ec_seckey_verify.
Discussion
Throws
secp256k1Error.incorrectKeySize if data is not 32 bytes; secp256k1Error.underlyingCryptoError if the scalar is invalid.