Warn that serde differs from consensus encoding

Addresses https://github.com/rust-bitcoin/rust-bitcoin/pull/756#discussion_r780844146
This commit is contained in:
Martin Habovstiak 2022-01-10 00:20:06 +01:00
parent 691173410a
commit 52560a9205
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@
//! To minimize dependencies, some functions are feature-gated. To generate //! To minimize dependencies, some functions are feature-gated. To generate
//! random keys or to re-randomize a context object, compile with the "rand" //! random keys or to re-randomize a context object, compile with the "rand"
//! feature. To de/serialize objects with serde, compile with "serde". //! 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 //! Where possible, the bindings use the Rust type system to ensure that
//! API usage errors are impossible. For example, the library uses context //! API usage errors are impossible. For example, the library uses context
@ -124,6 +125,7 @@
//! `global-context-less-secure`.) //! `global-context-less-secure`.)
//! * `global-context-less-secure` - enables global context without extra sidechannel protection. //! * `global-context-less-secure` - enables global context without extra sidechannel protection.
//! * `serde` - implements serialization and deserialization for types in this crate using `serde`. //! * `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). //! * `bitcoin_hashes` - enables interaction with the `bitcoin-hashes` crate (e.g. conversions).
// Coding conventions // Coding conventions