You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PrivateKey and XOnlyPublicKey from_slice functions have been
deprecated and calls to them from within the crate have been changed to
use the equivalent array function.
res[0..constants::PUBLIC_KEY_SIZE].try_into().expect("slicing uses the correct statically-known length which is less than UNCOMPRESSED_PUBLIC_KEY_SIZE");
174
+
PublicKey::from_byte_array_compressed(&bytes)
175
+
}
176
+
Ok(constants::UNCOMPRESSED_PUBLIC_KEY_SIZE) =>
177
+
PublicKey::from_byte_array_uncompressed(&res),
174
178
_ => Err(Error::InvalidPublicKey),
175
179
}
176
180
}
@@ -211,6 +215,7 @@ impl SecretKey {
211
215
/// use secp256k1::SecretKey;
212
216
/// let sk = SecretKey::from_slice(&[0xcd; 32]).expect("32 bytes, within curve order");
0 commit comments