Seal and Operation
Operation
create-account
, transfer
, key-updater
, currency-register
, currency-policy-updater
, and suffrage-infration
.Fact and token
The fact hash is a value representing the processed operation.
The fact hash must have a unique value in the blockchain.
So to check whether the operation is stored in the block, it can be retrieved using the fact hash.
- The contents that `sender A sends 100 to receiver B` must always have the same fact. - Fact hashes created using the same fact content can result in duplicate values. - If there are two or more operations that result in duplicate values of the fact hash, only the first operation is processed and the remaining operations are ignored.
{
"_hint": "mitum-currency-create-accounts-operation-fact-v0.0.1",
"hash": "3Zdg5ZVdNFRbwX5WU7Nada3Wnx5VEgkHrDLVLkE8FMs1",
"token": "cmFpc2VkIGJ5",
"sender": "8PdeEpvqfyL3uZFHRZG5PS3JngYUzFFUGPvCg29C2dBnmca",
"items": [
{
"_hint": "mitum-currency-create-accounts-single-amount-v0.0.1",
"keys": {
"_hint": "mitum-currency-keys-v0.0.1",
"keys": [
{
"_hint": "mitum-currency-key-v0.0.1",
"weight": 100,
"key": "2Aopgs1nSzNCWLvQx5fkBJCi2uxjYBfN8TqneqFd9DzGcmpu"
}
],
"threshold": 100
},
"amounts": [
{
"_hint": "mitum-currency-amount-v0.0.1",
"amount": "333",
"currency": "MCC"
}
]
}
]
}
The biggest advantage is that you can simply check whether the operation is processed or not as you exactly know the contents of the fact along with the token.
In the example above, anyone can calculate the fact hash if they know: the sender, receiver, currencyID, amount of currency, and a specific token value used.
Therefore, anyone can inquire whether the corresponding operation has been processed with the fact hash.
Seal
To transmit the seal, a signature made with a private key is required.
To create signature, you must use the private key created in Mitum’s keypair package.
Seal can contain up to 100 operations.
Send
Create as many operations as necessary within the maximum number able to be included in the seal, and put them in the seal.
Create and put a signature on the seal.
Send seal to Mitum node.