Skip to main content

eth_valkyoth_codec/
lib.rs

1#![no_std]
2#![forbid(unsafe_code)]
3//! Bounded decoding policy for untrusted Ethereum wire inputs.
4
5#[cfg(feature = "std")]
6extern crate std;
7
8mod budget;
9mod error;
10mod exact;
11mod rlp;
12
13pub use budget::{DecodeAccumulator, DecodeLimits};
14pub use error::{DecodeError, DecodeErrorCategory, ResourceError};
15pub use exact::{
16    checked_len_add, checked_range_end, require_exact_consumption, require_range_in_bounds,
17};
18pub use rlp::{
19    MAX_RLP_LIST_TRAVERSAL_DEPTH, MAX_RLP_U256_BYTES, RlpDecode, RlpDeriveError, RlpEncode,
20    RlpInteger, RlpItem, RlpList, RlpListForm, RlpListItems, RlpScalar, RlpScalarForm,
21    checked_encoded_len_add, decode_rlp_integer, decode_rlp_integer_partial, decode_rlp_list,
22    decode_rlp_list_partial, decode_rlp_scalar, decode_rlp_scalar_partial, decode_rlp_u64,
23    decode_rlp_u128, decode_rlp_u256_bytes, encode_decoded_integer, encode_decoded_item,
24    encode_decoded_list, encode_decoded_scalar, encode_rlp_integer, encode_rlp_list_header,
25    encode_rlp_list_payload, encode_rlp_scalar, encoded_rlp_integer_len,
26    encoded_rlp_list_header_len, encoded_rlp_list_len, encoded_rlp_scalar_len,
27    rlp_integer_payload_to_u64, rlp_integer_payload_to_u128, rlp_integer_payload_to_u256_bytes,
28    validate_rlp_integer_payload,
29};