Skip to main content

Crate hopr_protocol_start

Crate hopr_protocol_start 

Source
Expand description

This crate defines the Start sub-protocol used for HOPR Session initiation and management.

The Start protocol is used to establish Session as described in HOPR RFC-0012. and is implemented via the StartProtocol enum.

The protocol is defined via generic arguments I (for Session ID), T (for Session Target), C (for Session capabilities) and G (for Session Stealth Address commitment representation).

Per RFC-0012, the types I and T are serialized/deserialized to the CBOR binary format (see RFC7049) and therefore must implement serde::Serialize + serde::Deserialize. The capability type C must be expressible as a single unsigned byte.

The G type is used to represent the Session Stealth Address commitment representation. It is typically a PixGroupRepr

See StartProtocol docs for the protocol diagram.

Modules§

errors
Contains errors raised by the Start protocol.

Structs§

KeepAliveMessage
Keep-alive message for a Session with the identifier T.
SsaClientCommitmentMessage
Filling up the Client’s commitment to the Session Stealth Address (SSA).
SsaCommitChunking
How many commitment entries one SsaCommit message can carry, per delivery phase.
SsaServerCommitmentMessage
Sent by the Server either to deliver the commitment to new Session Stealth Addresses (SSAs), or to ask for the parts of an earlier commitment it never received.
StartErrorType
Error message in the Start protocol.
StartEstablished
Message of the Start protocol that confirms the establishment of a session.
StartInitiation
The session initiation message of the Start protocol.

Enums§

ErrorIdentifier
Identifies which entity a StartErrorType refers to.
ErrorIdentifierDiscriminants
Auto-generated discriminant enum variants
KeepAliveFlag
Individual flags that can be set in a KeepAliveMessage.
StartErrorReason
Lists all Start protocol error reasons.
StartProtocol
Lists all messages of the Start protocol for a session establishment.
StartProtocolDiscriminants
Auto-generated discriminant enum variants

Functions§

decode_deposit_data 🔒
Reads the per-SSA deposit data map, refusing one that announces more entries than a request can carry.

Type Aliases§

KeepAliveFlags
Flags that can be sent via the KeepAliveMessage.
PolynomialRun
Inclusive run of polynomial indices, as carried by SsaServerCommitmentMessage::missing.
StartChallenge
Challenge that identifies a Start initiation protocol message.