Skip to main content

xenith_layerzero/
lib.rs

1//! LayerZero v2 transport implementation for xenith.
2//!
3//! Provides [`LayerZeroTransport`], which implements
4//! [`xenith_core::MessagingTransport`] by routing cross-chain messages through
5//! LayerZero v2 endpoint contracts. Depends on [`xenith_core`] for traits and
6//! types. Stub behaviour ships by default; real endpoint calls are gated behind
7//! the `live` feature flag.
8//!
9//! ```
10//! use xenith_layerzero::LayerZeroTransport;
11//! use xenith_core::ChainId;
12//!
13//! let transport = LayerZeroTransport::new(
14//!     [0u8; 20],
15//!     vec![(ChainId::from(1), 30101), (ChainId::from(42161), 30110)],
16//! );
17//! ```
18//!
19//! See the [xenith_core] crate for core types and traits.
20
21#[cfg(feature = "live")]
22pub mod live;
23#[cfg(feature = "live")]
24pub mod options;
25pub mod transport;
26
27#[cfg(feature = "live")]
28pub use live::{K256Signer, LayerZeroLiveTransport};
29#[cfg(feature = "live")]
30pub use options::encode_executor_lz_receive_option;
31pub use transport::LayerZeroTransport;