pub struct StreamRequestExt {
pub binding: Option<ClientBinding>,
pub capability: Option<WireCapability>,
}Expand description
Optional StreamRequest extension fields (ADR 005 §Client identity
binding), carried as trailing bytes after the StreamRequest message via the
two-phase pattern (see encode_stream_request / parse_stream_request_ext).
Fields§
§binding: Option<ClientBinding>Off-chain client identity binding (address + attesting signature). Grouped so a half-populated state (address without signature, or vice versa) is unrepresentable; absent ⇒ a registered/on-chain client.
capability: Option<WireCapability>The pool owner’s spending capability for this stream’s signer,
attached at session start so the delivering node can register the
signer on that signer’s first on-chain redemption (ADR 003 §Capability
delegation). Node-agnostic: the same capability is valid at every node
the client streams from, since it grants spend against the pool, not
against a specific delivering node. Absent ⇒ the node already has the
signer registered (or the client is relying on a capability it sent on
an earlier stream to a different node this session).
Implementations§
Source§impl StreamRequestExt
impl StreamRequestExt
Sourcepub const fn validate(&self) -> Result<(), MessageValidationError>
pub const fn validate(&self) -> Result<(), MessageValidationError>
Validate the (if present) client binding and capability. Called by the
node on the receive path after parse_stream_request_ext; kept
separate from parsing so forward-compatible trailing bytes don’t couple
to value checks.
§Errors
MessageValidationError::InvalidBindingSigLen if a present binding
has a wrong-length signature; MessageValidationError::EmptyCapabilitySignature
if a present capability has an empty owner_signature.