From 52560a92053874957c80307cdcc91ce281732760 Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Mon, 10 Jan 2022 00:20:06 +0100 Subject: [PATCH] Warn that serde differs from consensus encoding Addresses https://github.com/rust-bitcoin/rust-bitcoin/pull/756#discussion_r780844146 --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 4419006..db59b09 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,7 @@ //! To minimize dependencies, some functions are feature-gated. To generate //! random keys or to re-randomize a context object, compile with the "rand" //! feature. To de/serialize objects with serde, compile with "serde". +//! **Important**: `serde` encoding is **not** the same as consensus encoding! //! //! Where possible, the bindings use the Rust type system to ensure that //! API usage errors are impossible. For example, the library uses context @@ -124,6 +125,7 @@ //! `global-context-less-secure`.) //! * `global-context-less-secure` - enables global context without extra sidechannel protection. //! * `serde` - implements serialization and deserialization for types in this crate using `serde`. +//! **Important**: `serde` encoding is **not** the same as consensus encoding! //! * `bitcoin_hashes` - enables interaction with the `bitcoin-hashes` crate (e.g. conversions). // Coding conventions