Introduction
Aggregates are a key-value store specific to an account. Each time a new aggregate message is received for a specific account, the nodes update the aggregate for this account.
Like a dictionary update, if a key already exists, it is updated, otherwise it is created.
The aggregate object inherits from the Message
object structure as follows:
{
// Message info
channel:
time:
type:
// Sender info
chain:
sender:
// Content
hash_type:
item_content:
key:
address:
content:
time:
item_hash:
item_type:
}
channel - text | Channel of the message. Ideally, an application would decide and use one channel. |
---|---|
time - float | Time the aggregate was created in seconds. |
type - text | Text representing the message object type. Value is |
chain - text | The chain used by the sender's account. |
sender -text | Chain address who sent and is signing the Aggregate Message. |
- | |
hash_type - optional text | Defaults to sha256. This is the only supported value for now. |
item_content - JSON string | JSON string representing the content of the aggregate. See below for the content of the string. |
items_content.key - text | The indexed key to reference the value (item_content.content ) is stored under. |
item_content.address - text | Chain address to associate the Aggregate with. |
item_content.content - object | Value object stored for the key. |
item_content.time - timestamp | Time the object was created. |
item_hash - hash | The hash of the item_content encrypted with SHA256. |
item_type - optional text | ipfs , inline or storage |