[][src]Crate strict_encoding

Re-exports

pub use strategies::Strategy;

Modules

net

Network addresses uniform encoding (LNPBP-??)

strategies

Implemented after concept by Martin Habovštiak martin.habovstiak@gmail.com

test_helpers

Macros

impl_enum_strict_encoding
strict_decode_self
strict_encode_list
test_encode

Macro to run test_suite

test_enum_u8_exhaustive
test_garbage_exhaustive

Macro to run test suite with garbage vector against all non-consensus enum values

Enums

Error

Possible errors during strict encoding and decoding process

Traits

ReadExt

Re-exporting extended read and write functions from bitcoin consensus module so others may use semantic convenience strict_encode::ReadExt

StrictDecode

Binary decoding according to the strict rules that usually apply to consensus-critical data structures. May be used for network communications. MUST NOT be used for commitment verification: even if the commit procedure uses StrictEncode, the actual commit verification MUST be done with [CommitVerify], [TryCommitVerify] and [EmbedCommitVerify] traits, which, instead of deserializing (nonce operation for commitments) repeat the commitment procedure for the revealed message and verify it against the provided commitment.

StrictEncode

Binary encoding according to the strict rules that usually apply to consensus-critical data structures. May be used for network communications; in some circumstances may be used for commitment procedures; however it must be kept in mind that sometime commitment may follow "fold" scheme (Merklization or nested commitments) and in such cases this trait can't be applied. It is generally recommended for consensus-related commitments to utilize [CommitVerify], [TryCommitVerify] and [EmbedCommitVerify] traits
from [paradigms::commit_verify] module.

WriteExt

Re-exporting extended read and write functions from bitcoin consensus module so others may use semantic convenience strict_encode::ReadExt

Functions

strict_deserialize

Convenience method for strict decoding of data structures implementing StrictDecode from any byt data source.

strict_serialize

Convenience method for strict encoding of data structures implementing StrictEncode into a byte vector.

Derive Macros

StrictDecode
StrictEncode