Auditable Accounting
Global Service Subsystem description
The main purpose of this service is to record data hashes on the i3-Market Blockchain to enhance the integrity of the actions and facilitate the audit processes.
Use cases
Record a new registry
Set a new registry
First, you need to add the hash value of the data to be recorded on the body of the following endpoint:
POST /registries
body: {"dataHash": string}
As a result, we see the status of the registry and the associated id.
response: {"id": number,"dataHash": string, "readyForRegistration": boolean}
Check a registry
Now, we can check the status of a previous recorded hash from an ID
GET /registries/$id
response: {"id": number,"dateOfReception": number, "dataHash": string, "merkleRoot": number, "merkleProof": Array[{"hash": string, "concatenateHashTo": string}], "readyForRegistration": boolean}
Update registries
This proccedures are automated with an internal cron call. But, it is possible to do manual calls as following...
Compute pending registries
This procedure is to manually compute the current registries and prepare a new transaction with the pending records.
POST /calculateMerkleRoot
```response: {"blockchainNetwork": string, "smartContractAddress": string, response": {"status": number, "message": string, "MerkleRoot": string, "txHash": string}}
Send transaction to blockchain
This procedure is to manually send the built transactions to the blockchain.
POST /updateRegistries
response: {"blockchainNetwork": string, "smartContractAddress": string, "response": {"status": number, "message": string, "newTxSentToBlockchain": Array
Created: 2022-04-06