Skip to main content

handle_didcomm

Function handle_didcomm 

Source
pub async fn handle_didcomm(
    content_type: Option<String>,
    body: Bytes,
    node: Arc<TapNode>,
    event_bus: Arc<EventBus>,
) -> Result<impl Reply, Infallible>
Expand description

Handler for DIDComm messages.

This function processes incoming DIDComm messages by:

  1. Validating the Content-Type header
  2. Converting the raw bytes to a UTF-8 string
  3. Parsing the string as a DIDComm message
  4. Forwarding the message to the TAP Node for further processing

The handler returns appropriate success or error responses based on the outcome.