fun unpackMessage(wallet: Wallet, packedMessage: String): Single<UnpackedMessage>
Unpacks the given packed message. The JSON parsing needs to happen in two steps. The first step is getting UnpackedPlainMessage, where the inner agent message is still represented as a string. In the second step, we parse this string as an AgentMessage. We can then return the UnpackedMessage.
wallet
- is the agent's wallet
packedMessage
- is JSON of the received encrypted message.
Return
UnpackedMessage is the decrypted message.