Module mydata_did.v1_0.handlers.da_negotiation_receipt_handler
Expand source code
from aries_cloudagent.messaging.base_handler import BaseHandler, BaseResponder, RequestContext
from dexa_sdk.managers.ada_manager import V2ADAManager
from ..messages.da_negotiation_receipt import DataAgreementNegotiationReceiptMessage
class DataAgreementNegotiationReceiptMessageHandler(BaseHandler):
"""Data agreement negotiation receipt message handler."""
async def handle(self, context: RequestContext, responder: BaseResponder):
"""Handle function
Args:
context (RequestContext): Request context.
responder (BaseResponder): Responder.
"""
# Assert the message type.
assert isinstance(context.message, DataAgreementNegotiationReceiptMessage)
# Initialize manager.
mgr = V2ADAManager(context)
# Process read-did message
await mgr.process_read_did_message(context.message, context.message_receipt)
Classes
class DataAgreementNegotiationReceiptMessageHandler
-
Data agreement negotiation receipt message handler.
Initialize a BaseHandler instance.
Expand source code
class DataAgreementNegotiationReceiptMessageHandler(BaseHandler): """Data agreement negotiation receipt message handler.""" async def handle(self, context: RequestContext, responder: BaseResponder): """Handle function Args: context (RequestContext): Request context. responder (BaseResponder): Responder. """ # Assert the message type. assert isinstance(context.message, DataAgreementNegotiationReceiptMessage) # Initialize manager. mgr = V2ADAManager(context) # Process read-did message await mgr.process_read_did_message(context.message, context.message_receipt)
Ancestors
- aries_cloudagent.messaging.base_handler.BaseHandler
- abc.ABC
Methods
async def handle(self, context: aries_cloudagent.messaging.request_context.RequestContext, responder: aries_cloudagent.messaging.responder.BaseResponder)
-
Handle function
Args
context
:RequestContext
- Request context.
responder
:BaseResponder
- Responder.
Expand source code
async def handle(self, context: RequestContext, responder: BaseResponder): """Handle function Args: context (RequestContext): Request context. responder (BaseResponder): Responder. """ # Assert the message type. assert isinstance(context.message, DataAgreementNegotiationReceiptMessage) # Initialize manager. mgr = V2ADAManager(context) # Process read-did message await mgr.process_read_did_message(context.message, context.message_receipt)