mesh_llm_payments/lib.rs
1//! Crash-recoverable inference payments over a provider-neutral wallet.
2//!
3//! The wallet itself lives behind [`mesh_llm_wallet::provider::WalletProvider`]
4//! and is supplied by a plugin through [`provisioning::WalletFactory`]. This
5//! crate owns everything the host must stay authoritative for: the ledger,
6//! pricing, budgets, payment intents and settlement orchestration.
7#![forbid(unsafe_code)]
8
9pub mod control;
10pub mod intent;
11pub mod ledger;
12pub mod operations;
13#[cfg(feature = "plugin-server")]
14pub mod plugin_server;
15pub use mesh_llm_wallet::provisioning;
16pub mod service;
17pub mod serving;
18
19// Pure data types live in `mesh-llm-payments-types` so mesh core can depend on
20// them without linking the ledger; re-exported here under their old paths.
21pub use mesh_llm_payments_types::{lifetimes, pricing, wire};
22
23/// Wallet types re-exported under their historical paths.
24pub mod invoice {
25 pub use mesh_llm_wallet::invoice::Invoice;
26}
27
28/// Wallet types re-exported under their historical paths.
29pub mod wallet {
30 pub use mesh_llm_wallet::provider::{
31 Balance, PayError, PaymentStatus, Transaction, WalletProvider,
32 };
33}
34
35pub use mesh_llm_wallet::now_ms;
36
37#[cfg(test)]
38mod tests;