Initializer
init(dataRepresentation:format:cache:)
Creates a MuSig aggregate public key from serialized bytes and a preserved key aggregation cache.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
init<D>(dataRepresentation data: D, format: P256K.Format, cache: [UInt8]) throws where D : ContiguousBytes
Parameters
-
data
-
Serialized public key bytes matching format.length.
-
format
-
The serialization format of data.
-
cache
-
The 197-byte secp256k1_musig_keyagg_cache from the original aggregate(_:) call; required for signing sessions.
Discussion
Throws
secp256k1Error.underlyingCryptoError if parsing via secp256k1_ec_pubkey_parse fails.