Skip to content

Commit 52560a9

Browse files
committed
Warn that serde differs from consensus encoding
Addresses rust-bitcoin/rust-bitcoin#756 (comment)
1 parent 6911734 commit 52560a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
//! To minimize dependencies, some functions are feature-gated. To generate
2323
//! random keys or to re-randomize a context object, compile with the "rand"
2424
//! feature. To de/serialize objects with serde, compile with "serde".
25+
//! **Important**: `serde` encoding is **not** the same as consensus encoding!
2526
//!
2627
//! Where possible, the bindings use the Rust type system to ensure that
2728
//! API usage errors are impossible. For example, the library uses context
@@ -124,6 +125,7 @@
124125
//! `global-context-less-secure`.)
125126
//! * `global-context-less-secure` - enables global context without extra sidechannel protection.
126127
//! * `serde` - implements serialization and deserialization for types in this crate using `serde`.
128+
//! **Important**: `serde` encoding is **not** the same as consensus encoding!
127129
//! * `bitcoin_hashes` - enables interaction with the `bitcoin-hashes` crate (e.g. conversions).
128130
129131
// Coding conventions

0 commit comments

Comments
 (0)