Messages are requests that you can use to communicate with the Aleph services. It can allow you to save key-value content, upload file, or run programs.
Currently available Aleph messages:
Message structure
All the messages follow this based structure:
// Message infotype: string | The type of the message, can be Post, Aggregate, Store, ...channel: string | Channel of the message, ideally one application has one channel.time: float | When the message was created.// Sender infosender: string | The address of the account that signed and sent the transaction.chain: string | The chain used by the sender: AVAX, ETH, DOT, SOL, ...// Contentitem_hash: string | The sha256 of the item_content field.item_content: JSON string | The content of the message according to its type.item_type: string | Where to store item_content: inline, IPFS, storage.hash_type: string | The algorithm used for the item_hash.
Item_content example
Each message has a differentitem_content. You can find their definition on their dedicated pages.
Item_content for a Post
item_content: type: // Type of the Post: blog, comment, ... address: // The account address associated with the post. content: // An object containing the content of the post. time: // When the object where created. ref: // A text that is linked to this post, another post for example.
Item_content for an Aggregate
item_content: key: // The indexed key under the content is stored. address: // The account address associated with the post. content: // An object containing the value associated with the key. time: // When the object where created.
Item_type and storage
You can choose several ways to store your data on the Aleph network.
When you are uploading a message on Aleph you can use the storageEngine param to ask the network where to store the content of your message. It can be a JSON string inside the item_content field or a database.
If your data could fall under GDPR. Set the storageEngine field to storage or ifps.