Initializer
init(_:format:)
Creates a secp256k1 private key for signing from a UInt256 constant.
- iOS 18.0+
- macCatalyst 18.0+
- macOS 15.0+
- tvOS 18.0+
- visionOS 2.0+
- watchOS 11.0+
init(_ staticInt: UInt256, format: P256K.Format = .compressed) throws
Parameters
-
staticInt
-
A UInt256 value whose raw bytes form the 32-byte private key scalar.
-
format
-
The serialization format of the companion publicKey; defaults to .compressed.
Discussion
Throws
secp256k1Error.underlyingCryptoError if the scalar is not a valid secp256k1 private key.