I am trying to understand if there currently exists a method to send a message from a contract to another contract or a private address? What would the Solidity code for this look like? Perhaps events could be used for that?
Given that there is no privacy on the blockchain, the message will obviously be readable by everyone. So the only way I can think of doing it is by encrypting the message using the recipient's public key.
Some related questions are below, but they don't have answers to my question (and it looks like Whisper is not yet implemented):
- How can I send some message from contract to addressHow can I send some message from contract to address
- Does Ethereum offer encrypted peer to peer communication applications?Does Ethereum offer encrypted peer to peer communication applications?
- Will Whisper work with Ethereum contracts, or should I try another way for sending secrets?Will Whisper work with Ethereum contracts, or should I try another way for sending secrets?
- How to encrypt a message with the public-key of an Ethereum addressHow to encrypt a message with the public-key of an Ethereum address