Expand description
Consensus encoding
This module defines a binary encoding interface which is more suitable for
consensus critical encoding than e.g. bincode. Over time all structs that
need to be encoded to binary will be migrated to this interface.
This code is based on corresponding rust-bitcoin types.
Modules§
- Serde implementations using hex-encoded encodables
Structs§
- Lightning TLV uses a custom variable-length integer called
BigSize. It is similar to Bitcoin’s variable-length integers except that it is serialized in big-endian instead of little-endian. - A writer counting number of writes written to it
Enums§
- A type that decodes
module_instance_id-prefixedTs even when correspondingDecoderis not available.
Constants§
- Maximum size, in bytes, of data we are allowed to ever decode for a single value.
Traits§
- Data which can be encoded in a consensus-consistent way
- Object-safe trait for things that can encode themselves
- Data which can be encoded in a consensus-consistent way
Functions§
- Specialized version of Decodable for bytes
- Specialized version of Decodable for bytes
- Specialized version of Decodable for fixed-size byte arrays
- Specialized version of Decodable for fixed-size byte arrays
- Specialized version of Encodable for bytes
- Specialized version of Encodable for static byte arrays