-
Notifications
You must be signed in to change notification settings - Fork 0
Blockchain Anatomy
A block transaction is the act of adding a block to the blockchain. This will contain some collection of orders which represent the chain of custody for some item or service type.
The process of adding a block to the blockchain is managed by the back end.
The block transaction represents the block to be added to the blockchain.
The block transaction has the following properties:
The ID is the unique identifier for the block transaction.
The index represents the position of the block transaction in the blockchain.
The timestamp marks the date and time of the block creation.
The previous hash holds the hash value of the previous block transaction.
The hash value is the hash functional output of the following block properties:
The payload holds the data to be stored to the blockchain.
The payload has the following properties:
The ID is the unique identifier for the payload.
The timestamp marks the date and time of the payload creation.
The data holds the order list to be stored to the blockchain.
The data has the following properties:
The ID is the unique identifier for the data.
The timestamp marks the date and time of the data creation.
The order is a collection of items and / or services to be stored to the blockchain.
The order has the following properties:
The item represents some item type, such as inventory, retail, or wholesale.
The item has the following properties:
The service represents some service type, such as clean up, construction, or delivery.
The service has the following properties:
Example of a block transaction
See block transaction for more detail.
{
"id": 1,
"index": 1,
"previousHash": "abc-123-xyz",
"hash": "abc-123-xyz",
"timeStamp": "2023-05-28 12:00:00",
"payload": {
"id": 10,
"timeStamp": "2023-05-27 12:00:00",
"data": {
"id": 100
"orders": [
{
"id": 1000,
"type": "PURCHASE",
"items": [
{
"id": 10000,
"name": "widget",
"description": "really neat widget",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 20000,
"name": "thingy",
"description": "really cool thingy",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 30000,
"name": "stuff",
"description": "really awesome stuff",
"price": 1000,
"quantity": 10,
"status": "back ordered"
}
],
"services": [
{
"id": 40000,
"name": "great service",
"description": "really great service",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 50000,
"name": "good service",
"description": "really good service",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 60000,
"name": "fun service",
"description": "really fun service",
"price": 1000,
"quantity": 10,
"status": "discounted"
},
],
"timeStamp": "2023-05-29 12:00:00",
"status": "pending",
"itemsTotal": 30000,
"servicesTotal": 30000,
"total": 60000
},
{
"id": 2000,
"type": "PURCHASE",
"items": [
{
"id": 10000,
"name": "widget",
"description": "really neat widget",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 20000,
"name": "thingy",
"description": "really cool thingy",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 30000,
"name": "stuff",
"description": "really awesome stuff",
"price": 1000,
"quantity": 10,
"status": "back ordered"
}
],
"services": [
{
"id": 40000,
"name": "great service",
"description": "really great service",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 50000,
"name": "good service",
"description": "really good service",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 60000,
"name": "fun service",
"description": "really fun service",
"price": 1000,
"quantity": 10,
"status": "discounted"
},
],
"timeStamp": "2023-05-29 12:00:00",
"status": "pending",
"itemsTotal": 30000,
"servicesTotal": 30000,
"total": 60000
},
{
"id": 3000,
"type": "PURCHASE",
"items": [
{
"id": 10000,
"name": "widget",
"description": "really neat widget",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 20000,
"name": "thingy",
"description": "really cool thingy",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 30000,
"name": "stuff",
"description": "really awesome stuff",
"price": 1000,
"quantity": 10,
"status": "back ordered"
}
],
"services": [
{
"id": 40000,
"name": "great service",
"description": "really great service",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 50000,
"name": "good service",
"description": "really good service",
"price": 1000,
"quantity": 10,
"status": "available"
},
{
"id": 60000,
"name": "fun service",
"description": "really fun service",
"price": 1000,
"quantity": 10,
"status": "discounted"
},
],
"timeStamp": "2023-05-29 12:00:00",
"status": "pending",
"itemsTotal": 30000,
"servicesTotal": 30000,
"total": 60000
}
],
"messages": [],
"references": [],
"extra": []
}
}
}