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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// The RPC-enabled MidribV3 + IERC20 sol! bindings now live in
// `aspens::evm::rpc` (gated on the `client` feature). Trading commands
// import them via `use crate::evm::rpc::{MidribV3, IERC20};`.
/// Generated protobuf bindings for the `arborter.v1` trading service.
///
/// This is the **only** place `xyz.aspens.arborter.v1.rs` is compiled. Every
/// `trading/` submodule imports from here rather than `include!`ing its own
/// copy: an `include!` is a textual expansion, so five copies were five sets
/// of distinct, mutually incompatible types with one wire format — the
/// `Order` you signed in `send_order` would not typecheck against the `Order`
/// spelled anywhere else. The bindings live next to the commands that wrap
/// the service, matching [`crate::commands::config::config_pb`] and
/// `commands::auth::auth_pb`. (`attestation.v1` is the one exception,
/// anchored at [`crate::attestation::v1`] because `build.rs` rewrites the
/// generated cross-package references to that absolute path.)
/// Query balances across chains (native gas, ERC-20 / SPL, locked / withdrawable).
/// Submit a `cancel_order` request and decode the gRPC response.
/// Deposit tokens into the trading contract so they're available to trade.
/// Resolve an order's budget and derive its canonical id — the client's own
/// copy of the id the arborter derives from the signed order. Nothing here
/// goes on the wire. (Despite the name, nothing here signs or locks.)
/// Build, sign, and submit a buy/sell order envelope.
/// Subscribe to the orderbook stream for a given market.
/// Subscribe to the trades stream for a given market.
/// Withdraw tokens from the trading contract back to the user's wallet.
/// FCE direct-action routing: builds the same signed envelopes as the gRPC
/// commands and submits them through the ext-proxy transport. Only compiled
/// when both `client` and `fce` are on.
/// Encode a prost message and sign the bytes with `wallet` — the outer
/// envelope signature the arborter authenticates. Shared by the gRPC and FCE
/// paths so the signed bytes are byte-identical (the cross-repo parity
/// invariant; see AGENTS.md). Order entry / cancel both authenticate this way.
pub async
/// Render a millisecond Unix timestamp as `HH:MM:SS` (UTC), falling back to
/// the raw number if it cannot be interpreted.
///
/// Display only — no signed value is derived from it. Shared by
/// [`stream_trades`] and [`stream_orderbook`], which each carried a
/// byte-identical private copy; they format the same `timestamp` field off the
/// same stream, so two copies could only ever drift apart, never usefully
/// differ.
pub
/// Abbreviate an address for column display: first 6 and last 4 characters.
/// Anything 12 characters or shorter is returned unchanged.
///
/// Display only — never fed back into a market id, an order, or a hash. Same
/// deduplication note as [`format_timestamp`].
pub