pub trait TapAgentExt {
// Required method
fn send_serialized_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 PlainMessage,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
This trait extends the TapAgent with methods for serializing and packing DIDComm messages for transmission. It provides functionality for converting in-memory message objects to secure, serialized formats that follow the DIDComm messaging protocol standards.
Required Methods§
Sourcefn send_serialized_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 PlainMessage,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_serialized_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 PlainMessage,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Pack and serialize a DIDComm message for transmission
This method takes a DIDComm message and recipient DID, then:
- Uses the agent’s PlainMessagePacker to properly sign and encrypt the message
- Serializes the message to a string format
§Parameters
message
- The DIDComm message to serializeto_did
- The DID of the recipient
§Returns
The packed message as a string, ready for transmission