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
55
56
57
58
59
60
//! Spec-faithful mirror of the `CoW` Protocol orderbook `OpenAPI` document.
//!
//! **Do not edit this file manually.** The contents of `inner` are generated
//! by [`progenitor`](https://crates.io/crates/progenitor) from
//! `specs/orderbook-api.yml` via `build.rs`.
//!
//! # Role
//!
//! This module is an **internal** compile-time mirror of the upstream API
//! spec. Two things make it valuable even though neither `super::api` nor any
//! other part of the crate calls into the generated HTTP [`inner::Client`]:
//!
//! 1. **Build-time spec validation.** If the upstream `OpenAPI` document drifts in a way
//! `progenitor` cannot model, the crate fails to build.
//! 2. **Wire-format drift detection.** The `wire_compat` test module at
//! `src/order_book/wire_compat.rs` round-trips instances of the hand-written [`super::types`]
//! through the generated `inner::types` via `serde_json`. Any breaking schema change upstream —
//! a renamed field, a type flip, a new required property — turns those tests red.
//!
//! The generated HTTP client (`inner::Client`) is not used at runtime; the
//! public [`super::api::OrderBookApi`] is a hand-written `reqwest` wrapper
//! that exposes the richer domain types in [`super::types`] (backed by
//! `alloy_primitives::Address`, typed enums, etc.). Rebranching
//! `OrderBookApi` onto `inner::Client` would be a semver-breaking refactor
//! and is tracked separately.
//!
//! Visibility is `pub(crate)` — external consumers should never depend on
//! these types directly; use [`super::types`].
pub
pub use types;