Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here are the key components needed for implementing generic JSON message / DIDComm tunnel.

...

Introducing generic message service for new message type 

  • This service will handle inbound messages of type `https://didcomm.org/json/1.0/message.` Incoming messages will contain content~attach, data-type, ~thread and ~timing fields.
  • Event handlers for specific data-type should be able to get registered with this service. Duplicate event handlers for same data-type can be registered.
  • It will be service implementation's responsibility to find data-type from incoming messages and calling registered handlers by passing content of messages like attachment, timing and thread info.
    Service should use generic message only to find respective handlers, it shouldn't manipulate/persist any of the message contents.
  • Service should also implement send message feature which can be a new message or reply to existing message (updated ~thread, ~timing decorators in outbound message)
  • Service should also provide way to unregister already registered handlers.

...