MediBloc Panacea
Search…
AOL
The AOL(Append Only Log), which can store various useful data such as healthcare data, is the key feature of the Panacea blockchain. It allows user to manage topics, authorities, and data.

Overview

Create Topic

1
// MsgCreateTopic - create topics
2
type MsgCreateTopic struct {
3
TopicName string `json:"topic_name"`
4
Description string `json:"description"`
5
OwnerAddress sdk.AccAddress `json:"owner_address"`
6
}
Copied!
A MsgCreateTopic is constructed to facilitate the AOL topic. Message sender can set a topic and description. The writer can add record after receiving the appropriate privileges.
Each field has limit. See the Limits section.

Add Writer

1
// MsgAddWriter - add writer to the topic
2
type MsgAddWriter struct {
3
TopicName string `json:"topic_name"`
4
Moniker string `json:"moniker"`
5
Description string `json:"description"`
6
WriterAddress sdk.AccAddress `json:"writer_address"`
7
OwnerAddress sdk.AccAddress `json:"owner_address"`
8
}
Copied!
The owner of the exist topics can manage writer privileges. Writer who received privileges from the topic owner can add record to the topic. This means that the owner authenticate the writer. This MsgAddWriter performs a function similar to issuing a certificate.
Each field has limit. See the Limits section.

Delete Writer

1
// MsgDeleteWriter - delete writer from the topic
2
type MsgDeleteWriter struct {
3
TopicName string `json:"topic_name"`
4
WriterAddress sdk.AccAddress `json:"writer_address"`
5
OwnerAddress sdk.AccAddress `json:"owner_address"`
6
}
Copied!
This MsgDeleteWriter removes writer from the topic. It is impossible to add record to the topic after being deprived of authority.
Each field has limit. See the Limits section.

Add Record

1
// MsgAddRecord - add record to topic
2
type MsgAddRecord struct {
3
TopicName string `json:"topic_name"`
4
Key []byte `json:"key"`
5
Value []byte `json:"value"`
6
WriterAddress sdk.AccAddress `json:"writer_address"`
7
OwnerAddress sdk.AccAddress `json:"owner_address"`
8
FeePayerAddress sdk.AccAddress `json:"fee_payer_address"`
9
}
Copied!
This MsgAddRecord add record or any data to the topic. If FeePayerAddress is provided, node charges fee to FeePayer.
Each field has limit. See the Limits section.

Limits

Field
Min Length
Max Length
Charset
TopicName
1
70
a-z, A-Z, 0-9, ., _ and -
Moniker
0
70
a-z, A-Z, 0-9, ., _ and -
Description
0
5,000
Any
Key
0
70
Any
Value
0
5,000
Any
Last modified 2mo ago