fedimint_core

Module encoding

Source
Expand description

Consensus encoding Binary encoding interface suitable for consensus critical encoding.

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.

See Encodable and Decodable for two main traits.

Modulesยง

as_base64
as_hex
Serde implementations using hex-encoded encodables
bls12_381 ๐Ÿ”’
btc
collections ๐Ÿ”’
iroh ๐Ÿ”’
secp256k1 ๐Ÿ”’
threshold_crypto ๐Ÿ”’
tls ๐Ÿ”’

Macrosยง

impl_encode_decode_num_as_bigsize ๐Ÿ”’
impl_encode_decode_num_as_plain ๐Ÿ”’
impl_encode_decode_tuple ๐Ÿ”’

Structsยง

CountWrite
A writer counting number of bytes written to it
DecodeError

Enumsยง

DynRawFallback
A type that decodes module_instance_id-prefixed Ts even when corresponding Decoder is not available.

Constantsยง

MAX_DECODE_SIZE
Maximum size, in bytes, of data we are allowed to ever decode for a single value.

Traitsยง

Decodable
Data which can be encoded in a consensus-consistent way
DynEncodable
Object-safe trait for things that can encode themselves
Encodable
Data which can be encoded in a consensus-consistent way

Derive Macrosยง

Decodable
Encodable