With the functions CreateMSG2Group/SubmitMSG2Group and CreateMSG2Address/SubmitMSG2Address in the messaging namespace (for example https://coin.codeb.io/messaging.asmx) you can send anonymous, but authenticated messages, as broadcast to all members of the group or directly to one identity contract or principal identity.
Note: Functions ending with “Group” are broadcasting to all members of a group while functions ending with “Address” send a message targeted to one SSI or principal account. You can create a message and submit it manually to SubmitMessage2Mesh with functions starting with “Create”. Functions starting with “Submit” automatically submit the created message to SubmitMessage2Mesh.
Possible function parameters are:
The secure messaging requires members to be registered with one or several Group IDs. The value range is 0-9999. Group IDs could be for example country codes such as 49 for Germany. When CalculateZKPKeys is triggered it calculates the crypto material for all SSIs registered with that Group ID.
This specifies the address of the groups Key Distribution Identity Contract.
The message to be sent in clear text. A message could be also a JSON object or an object in any other different format.
The SenderAddress/SenderAddressPassword is used to lookup the ZKPs in their assigned identity contract.
Reply2Address/Reply2AddressPassword is used to encrypt the message. This address MUST NOT be registered anywhere to remain anonymous. You can always create a new, throw away account with CreateMSGKeyOnNode. If the fields are left empty then SenderAddress/SenderAddressPassword is used instead and the message WILL NOT be anonymous anymore.
If you specify the RecipientAddress then a message is sent directly to that recipient instead of doing a broadcast to all members of the group.
This is the encrypted message body. To validate a message you can use function ValidateMSG.
This needs to be specified to be able to submit a message to the mesh via SubmitMessage2Mesh. It functions only as a SPAM protection and does not have any other functionality.