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, RlpInteger, RlpItem, RlpList, RlpListForm,
20    RlpListItems, RlpScalar, RlpScalarForm, decode_rlp_integer, decode_rlp_integer_partial,
21    decode_rlp_list, decode_rlp_list_partial, decode_rlp_scalar, decode_rlp_scalar_partial,
22    decode_rlp_u64, decode_rlp_u128, decode_rlp_u256_bytes, encode_decoded_integer,
23    encode_decoded_item, encode_decoded_list, encode_decoded_scalar, encode_rlp_integer,
24    encode_rlp_list_payload, encode_rlp_scalar, encoded_rlp_integer_len, encoded_rlp_list_len,
25    encoded_rlp_scalar_len, rlp_integer_payload_to_u64, rlp_integer_payload_to_u128,
26    rlp_integer_payload_to_u256_bytes, validate_rlp_integer_payload,
27};