diff --git a/src/key.rs b/src/key.rs index 2c65e2cd3..fc5b649e7 100644 --- a/src/key.rs +++ b/src/key.rs @@ -38,6 +38,12 @@ use schnorr; /// Secret 256-bit key used as `x` in an ECDSA signature. /// +/// # Serde support +/// +/// Implements de/serialization with the `serde` feature enabled. Serialized data is fixed width (32 +/// bytes) if you use `bincode` to do serialization, other binary formats may add metadata to the +/// serialized data (e.g. cbor and tycho). +/// /// # Examples /// /// Basic usage: @@ -73,6 +79,12 @@ pub const ONE_KEY: SecretKey = SecretKey([0, 0, 0, 0, 0, 0, 0, 0, /// A Secp256k1 public key, used for verification of signatures. /// +/// # Serde support +/// +/// Implements de/serialization with the `serde` feature enabled. Serialized data is fixed width (33 +/// bytes) if you use `bincode` to do serialization, other binary formats may add metadata to the +/// serialized data (e.g. cbor and tycho). +/// /// # Examples /// /// Basic usage: @@ -971,6 +983,12 @@ impl<'de> ::serde::Deserialize<'de> for KeyPair { /// An x-only public key, used for verification of Schnorr signatures and serialized according to BIP-340. /// +/// # Serde support +/// +/// Implements de/serialization with the `serde` feature enabled. Serialized data is fixed width (32 +/// bytes) if you use `bincode` to do serialization, other binary formats may add metadata to the +/// serialized data (e.g. cbor and tycho). +/// /// # Examples /// /// Basic usage: