aztec_rs/lib.rs
1//! Rust runtime and client workspace for the Aztec Network.
2//!
3//! `aztec-rs` re-exports the full workspace: an embedded PXE runtime, wallet
4//! and account layers, node and Ethereum clients, contract tooling, and core
5//! Aztec types.
6//!
7//! For Aztec v4.x, PXE runs client-side. This repository includes that runtime
8//! in `aztec-pxe`; it is not just a thin wrapper around node RPC.
9//!
10//! # Quick Start
11//!
12//! ```no_run
13//! use aztec_rs::node::{create_aztec_node_client, wait_for_node, AztecNode};
14//!
15//! # async fn example() -> Result<(), aztec_rs::Error> {
16//! let node = create_aztec_node_client("http://localhost:8080");
17//! let info = wait_for_node(&node).await?;
18//! println!("Connected to node v{}", info.node_version);
19//! let block = node.get_block_number().await?;
20//! println!("Current block: {block}");
21//! # Ok(())
22//! # }
23//! ```
24
25/// ABI types, selectors, and contract artifact loading.
26pub mod abi {
27 pub use aztec_core::abi::*;
28}
29/// Account abstraction: traits, account manager, and deployment.
30pub mod account {
31 pub use aztec_account::account::*;
32 pub use aztec_account::entrypoint;
33 pub use aztec_account::meta_payment;
34 pub use aztec_account::schnorr;
35 pub use aztec_account::signerless;
36 pub use aztec_account::AccountEntrypointMetaPaymentMethod;
37 pub use aztec_account::DefaultAccountEntrypoint;
38 pub use aztec_account::DefaultMultiCallEntrypoint;
39 pub use aztec_account::SchnorrAccountContract;
40 pub use aztec_account::SignerlessAccount;
41 pub use aztec_account::SingleAccountProvider;
42}
43/// Authorization witness types and helpers.
44pub mod authorization {
45 pub use aztec_account::authorization::*;
46}
47/// Authwit interaction helpers (public authwit, validity checking).
48pub mod authwit {
49 pub use aztec_contract::authwit::*;
50}
51/// Contract handles and function interactions.
52pub mod contract {
53 pub use aztec_contract::contract::*;
54}
55/// Contract deployment helpers and deployer builder.
56pub mod deployment {
57 pub use aztec_contract::deployment::*;
58}
59/// Crate-level error types.
60pub mod error {
61 pub use aztec_core::error::*;
62}
63/// Public and private event types and decoding.
64pub mod events {
65 pub use aztec_contract::events::*;
66}
67/// Protocol contract addresses and constants.
68pub mod constants {
69 pub use aztec_core::constants::*;
70}
71/// Cryptographic primitives and key derivation.
72pub mod crypto {
73 pub use aztec_crypto::*;
74}
75/// Poseidon2 hash functions and authwit hash computation.
76pub mod hash {
77 pub use aztec_core::hash::*;
78}
79/// Gas and fee payment types.
80pub mod fee {
81 pub use aztec_core::fee::*;
82 pub use aztec_fee::*;
83}
84/// Cross-chain utilities (L1↔L2 message readiness).
85pub use aztec_ethereum::cross_chain;
86/// L1 client for Inbox/Outbox contract interaction.
87pub use aztec_ethereum::l1_client;
88/// L1-L2 messaging helpers.
89pub use aztec_ethereum::messaging;
90/// Node client, readiness polling, and receipt waiting.
91pub mod node {
92 pub use aztec_node_client::node::*;
93}
94/// PXE client, readiness polling, and PXE trait.
95pub mod pxe {
96 pub use aztec_pxe_client::pxe::*;
97}
98/// Embedded PXE implementation (in-process, client-side).
99pub mod embedded_pxe {
100 pub use aztec_pxe::*;
101}
102/// Transaction types, receipts, statuses, and execution payloads.
103pub mod tx {
104 pub use aztec_core::tx::*;
105}
106/// Core field, address, key, and contract instance types.
107pub mod types {
108 pub use aztec_core::types::*;
109}
110/// Wallet trait, `BaseWallet`, and account provider abstractions.
111pub mod wallet {
112 pub use aztec_wallet::account_provider::*;
113 pub use aztec_wallet::base_wallet::*;
114 pub use aztec_wallet::wallet::*;
115}
116
117pub use error::Error;