Closed tvanderstad closed 2 years ago
Hi friends :wave: When trying to serialize and deserialize a PublicKey using bincode like this:
PublicKey
bincode
bincode::deserialize::<libsecp256k1::PublicKey>( &bincode::serialize(&libsecp256k1::PublicKey::from_secret_key( &libsecp256k1::SecretKey::random(&mut rand::rngs::OsRng), )) .unwrap(), ) .unwrap();
I get the following runtime error:
thread 'test::repro' panicked at 'called `Result::unwrap()` on an `Err` value: Custom("invalid type: byte array, expected a bytestring of either 33 (compressed), 64 (raw), or 65 bytes in length")'
I am using the following versions of things:
bincode = "1.3.3" rand = "0.8.4" libsecp256k1 = "0.7.0"
Hi friends :wave: When trying to serialize and deserialize a
PublicKey
usingbincode
like this:I get the following runtime error:
I am using the following versions of things: