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
//! Client for a [Sidewinder](https://github.com/richdrich/sidewinder) sidechain node.
//!
//! [`SidewinderClient`] wraps the node's Representational State Transfer (REST) surface — the reconciled
//! `sidewinder_rest.yaml` v0.1.1 contract — behind the [`SidewinderOps`] trait, one method per
//! endpoint. It is built on an [`algo_ops::AlgoOps`] handle (the enrolled parent-chain account, which
//! signs the transactions the client builds) plus a [`SidewinderConfig`] naming the node URL and
//! bearer token.
//!
//! Beyond wrapping the endpoints, the client builds, canonically encodes, and signs transactions:
//! [`SidewinderClient::build_signed_transaction`] turns a [`TransactionRequest`] into the bytes and
//! identifier, and [`SidewinderClient::submit_transaction`] builds, signs, and submits in one call.
//!
//! The client speaks only the HTTP contract; it takes no code dependency on the `sidewinder` crates and
//! keeps neutral types on the boundary (e.g. [`PendingTransaction`], [`NodeStatus`]), so a consumer
//! stays decoupled from the node's internal versions. Certificate and proof bytes are surfaced opaque
//! and are not verified (a v0.0.2 non-goal).
// Re-exported so a caller can build transaction arguments as `sidewinder_ops::AppArg` without a
// second `use algo_ops::AppArg;` — the argument packing is shared with algo_ops, not reimplemented.
pub use AppArg;
// Re-exported so a caller reading a `DiscoveredNode`'s endpoint needs only this crate.
pub use ;
pub use SidewinderConfig;
pub use ;
pub use ;
pub use EndpointRecord;
pub use ;
pub use ;