TransportDIDCommOverHTTP

fmgp.did.framework.TransportDIDCommOverHTTP
See theTransportDIDCommOverHTTP companion object
class TransportDIDCommOverHTTP(destination: String, inboundBuf: Hub[SignedMessage | EncryptedMessage]) extends TransportDIDComm[Client & Scope]

Client-side HTTP transport for DIDComm messaging.

Implements the Transport abstraction over HTTP. Outbound and inbound are independent, unrelated message flows — they are NOT coupled as HTTP request-response pairs.

==Features==

  • R1 — Outbound delivery: POST the DIDComm message as JSON to destination with the correct Content-Type header (application/didcomm-signed+json or application/didcomm-encrypted+json).
  • R2 — Inbound via Hub (broadcast): inbound supports multiple concurrent subscribers (pub-sub / broadcast semantics via Hub). Every subscriber receives every message published after their subscription.
  • R3 — No late subscriber guarantee: Hub does not replay past messages. Subscribers that connect after a message was published will not receive it. This is by design.
  • R4 — HTTP response parsing: After each outbound POST, the HTTP response body is parsed. If it contains a valid DIDComm message (SignedMessage or EncryptedMessage), it is published to the inbound Hub. If the body is empty, not valid JSON, or not a DIDComm message, it is logged and ignored.
  • R5 — TransportID: Uses TransportID.http.
  • R6 — Error handling: HTTP errors (non-2xx status) are logged but not delivered to inbound. Network/connection failures are logged and the effect dies (orDie).
  • R7 — SingleTransmission semantics: TransmissionType is SingleTransmission, unlike WebSocket's MultiTransmissions.
  • R8 — Environment: Requires Client & Scope from zio-http. The companion object provides makeWithEnvironment to pre-inject the environment and return a TransportDIDComm[Any].

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def id: String
def inbound: ZStream[Client & Scope, InErr, SignedMessage | EncryptedMessage]

Reciving from the other side. Income Messages

Reciving from the other side. Income Messages

Attributes

def outbound: ZSink[Client & Scope, OutErr, SignedMessage | EncryptedMessage, Nothing, Unit]

Send to the other side. Out going Messages

Send to the other side. Out going Messages

Attributes

Describe properties about the Flow (direction) of data for this transport

Describe properties about the Flow (direction) of data for this transport

Attributes

Describe properties about the Type connection in this transport

Describe properties about the Type connection in this transport

Attributes

Inherited methods

def provide(env: ZEnvironment[Client & Scope]): Transport[Any, SignedMessage | EncryptedMessage, SignedMessage | EncryptedMessage]

Attributes

Inherited from:
Transport
def send(message: SignedMessage | EncryptedMessage): ZIO[Client & Scope, Nothing, Unit]

Attributes

Inherited from:
Transport