sidewinder_ops
A synchronous client for a Sidewinder sidechain node.
Note: Sidewinder is not released yet. This client targets the pinned
sidewinder_rest.yamlv0.1.1 REST contract and is built and tested against it; it does not depend on any published Sidewinder crate.
SidewinderClient wraps the node's 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) plus a SidewinderConfig naming the
node URL and bearer token.
use AlgoOps;
use ;
let algo = new_for_algorand;
let client = from_algo_ops;
let alive = client.health?;
let params = client.params?;
// Build, canonically encode, and sign a `Slot.set(slot_id, value)` with the enrolled key,
// then submit it — `submit_transaction` does all three in one call.
let request = TransactionRequest ;
let txid = client.submit_transaction?;
let pending = client.status?;
Design notes
- Speaks only the HTTP contract — no code dependency on the
sidewindercrates. Neutral types on the boundary keep consumers decoupled from the node's internal versions. - Synchronous API over the async
reqweststack, driven on a per-call Tokio runtime — the same shapealgo_opsuses over algod. - Certificate and proof bytes are surfaced opaque and are not verified (a v0.0.2 non-goal).
- The client owns the Sidewinder canonical MessagePack encoding, packs operation arguments with the
shared
algo_ops::AppArg(the Algorand application-arguments / Algorand Request for Comments 4, ARC-4, convention), and signs the canonical body with the enrolledalgo_opsEd25519 key (AlgoOps::sign_bytes).build_signed_transactionreturns the bytes and transaction identifier;submit_transactionbuilds, signs, and submits.submitstill accepts pre-encoded bytes directly.
Tests
cargo test -p sidewinder_ops runs the unit bucket against an in-process mock HTTP node — no
external services required.
cargo test -p sidewinder_ops --test integration runs the external end-to-end bucket against a
running Sidewinder node nest (build → sign → submit → poll-to-final → assert). It is configured from
the environment and skips cleanly when the nest is unconfigured or unreachable — see
tests/integration/README.md.