1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! OpenAI-compatible HTTP gateway, paid with x402.
//!
//! Load one TOML file, bind `server.bind`, and serve `/health`, `/ready`,
//! `/v1/pricing`, and a billed reverse proxy to an OpenAI-compatible
//! upstream (Bifrost). Chat/completions/embeddings/responses use `upto`;
//! other exported HTTP paths use `exact`. Realtime WebSocket and admin
//! paths are rejected.
//!
//! Default features are `evm` + `svm`. Production extras (`near`, `xrpl`,
//! `hedera`, `avm`, `aptos`, `keeta`, `tvm`, `stellar`, `concordium`) are
//! behind `full`. `experimental-tron` is opt-in and is **not** in `full`.
pub use ;
pub use AppError;
/// Process entry used by the `o402` binary: `init` or `serve`.
///
/// # Errors
///
/// Returns [`AppError`] from the selected subcommand.
pub async
/// Serve HTTP on `config.server.bind` until SIGINT/SIGTERM.
///
/// # Errors
///
/// Returns [`AppError`] if bind or the server IO loop fails.
pub async