Crate ubl_sirp

Crate ubl_sirp 

Source
Expand description

SIRP network capsule + receipt handling (HTTP/server optional).

Also provides minimal wire protocol via the wire module.

Re-exports§

pub use capsule::build_capsule;
pub use capsule::parse_capsule;
pub use capsule::CapsuleBytes;
pub use receipt::sign_receipt;
pub use receipt::verify_receipt;
pub use receipt::Receipt;
pub use wire::decode_frame;
pub use wire::encode_frame;
pub use wire::CanonIntent;
pub use wire::SirpError;
pub use wire::SirpFrame;
pub use wire::DOMAIN_FRAME_SIGN;
pub use wire::FLAG_SIGNED;
pub use wire::SIRP_MAGIC;
pub use wire::SIRP_VERSION;

Modules§

capsule
Capsule encode/decode. Capsule encode/decode helpers: DIM (u16 BE) + canonical payload bytes.
idempotency
Idempotency store (sqlite). SQLite-backed idempotency store used by the SIRP server.
receipt
Receipt encode/verify. Receipt signing and verification for SIRP capsules.
server
Minimal server/router. Minimal Axum server for SIRP capsules with optional HMAC and SQLite idempotency.
transport_http
HTTP transport helpers. HTTP client helper to send SIRP capsules with optional HMAC and retry/backoff.
wire
SIRP Wire Protocol (TLV-based minimal frames). SIRP Wire Protocol — minimal TLV format for intent routing.

Functions§

canon_intent_from_value
Convenience: build a CanonIntent from any JSON value.