signet_bundle/lib.rs
1//! Signet Bundle Library
2//!
3//! Contains the [`SignetCallBundle`] and [`SignetEthBundle`] type, and
4//! utilities related to creating and simulating Signet bundles.
5//!
6//! # Bundles
7//!
8//! The [`SignetCallBundle`] and [`SignetEthBundle`] types are used to simulate
9//! transaction bundles in different ways. The [`SignetBundleDriver`] type
10//! drives a [`SignetCallBundle`] to completion and generates a
11//! [`SignetCallBundleResponse`]. This is used primarily by the RPC server to
12//! serve `signet_callBundle` requests. The response includes the standard
13//! flashbots-style response information, as well as a description of the fills
14//! necessary to make the bundle valid on Signet.
15//!
16//! The [`SignetEthBundle`] type is used to simulate transaction bundles while
17//! building blocks. It is used primarily by builders and relays. The
18//! [`SignetEthBundleDriver`] drives a [`SignetEthBundle`] to completion and
19//! enforces bundle rules. When used in a block builder, it will ensure that the
20//! bundle is valid and that the fills are valid at the time of block
21//! construction.
22//!
23//! # Using [`SignetEthBundle`] safely
24//!
25//! The [`SignetEthBundle`] type contains actions that must be performed on
26//! both chains. As such, its simulation must be performed on both chains. The
27//! primary transaction simulation via [`SignetEthBundleDriver`] is performed
28//! locally using [`trevm`].
29
30#![warn(
31 missing_copy_implementations,
32 missing_debug_implementations,
33 missing_docs,
34 unreachable_pub,
35 clippy::missing_const_for_fn,
36 rustdoc::all
37)]
38#![cfg_attr(not(test), warn(unused_crate_dependencies))]
39#![deny(unused_must_use, rust_2018_idioms)]
40#![cfg_attr(docsrs, feature(doc_cfg))]
41
42mod call;
43pub use call::{SignetBundleApi, SignetBundleDriver, SignetCallBundle, SignetCallBundleResponse};
44
45mod send;
46pub use send::{
47 BundleInspector, BundleRecoverError, RecoverError, RecoveredBundle, SignetEthBundle,
48 SignetEthBundleDriver, SignetEthBundleError, SignetEthBundleInsp, TxRequirement,
49};