1//! `RLPx` ECIES framed transport protocol.
23#![doc(
4 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
5 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
6 issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
7)]
8#![cfg_attr(not(test), warn(unused_crate_dependencies))]
9#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
1011pub mod algorithm;
12pub mod mac;
13pub mod stream;
14pub mod util;
1516mod error;
17pub use error::{ECIESError, ECIESErrorImpl};
1819pub mod codec;
2021use alloy_primitives::{
22 bytes::{Bytes, BytesMut},
23 B512 as PeerId,
24};
2526/// Raw egress values for an ECIES protocol
27#[derive(Clone, Debug, PartialEq, Eq)]
28pub enum EgressECIESValue {
29/// The AUTH message being sent out
30Auth,
31/// The ACK message being sent out
32Ack,
33/// The message being sent out (wrapped bytes)
34Message(Bytes),
35}
3637/// Raw ingress values for an ECIES protocol
38#[derive(Clone, Debug, PartialEq, Eq)]
39pub enum IngressECIESValue {
40/// Receiving a message from a [`PeerId`]
41AuthReceive(PeerId),
42/// Receiving an ACK message
43Ack,
44/// Receiving a message
45Message(BytesMut),
46}