rooot-node-lib

This library holds the common modules used by the Rooot™ system in Golang. It's specially suited for applications involving the node.
Usage
$ go get github.com/edgewhere/rooot-node-lib
For example, to manipulate transactions, you may import the Transaction model:
import "github.com/edgewhere/rooot-node-lib/models/transaction"
var tx transaction.Transaction
As a reminder, the following presents the general model of a Transaction of any kind in Rooot™:
{
"transactionId": "",
"lastBlockId": "",
"subchain": {
"initialTransactionId": "",
"lastStateTransactionId": "",
"finalTransactionId": ""
},
"timestamp": 0,
"contract": {
"type": "",
"channel": "",
"features": {
"start": 0,
"end": 0,
"maxUse": -1,
"freq": {
"firstPeriodId": 0,
"cycleLength": 0,
"usePerCycle": 0,
"currentPeriodId": 0
},
"dest": {
"purpose": ["0xffff"],
"scope": []
}
},
"signatures": {
"beneficiary": "",
"emitter": ""
}
},
"identification": {
"rand": 0,
"beneficiary": {
"id": "",
"checker": "",
"depositary": ""
},
"emitter": {
"id": "",
"checker": "",
"depositary": ""
},
"footprint": ""
},
"script": "",
"oblivionCode": ""
}
And the following the general model of a Block in Rooot™:
{
"blockId": "",
"header": {
"lastMiners": {
"onPeriod": 0,
"valid": [],
"invalid": []
},
"newTransactions": [],
"signature": "",
"publicKey": "",
"nonce": ""
},
"previousBlockId": "",
"timestamp": 0,
"periodId": 0,
"transactions": [],
"oblivionHash": ""
}
As of the latest version, there are five types of Transaction: (chronogically) "opt-in", "state", "opt-out", "oblivion" and "oblivion-ar".
Browser library
You might also want to check out the browser library developed by Edgewhere in TypeScript on NPM: rooot-browser-lib.
It's working hand in hand with this Go library to allow for building and writing transactions to the Rooot™ blockchain.
License
The use of the Rooot™ node API is subject to fees for commercial purpose. Please contact us to get further information.
In any case, the use of this library is subject to the respect of the GNU AGPL-3.0 license.
© 2019-2021 Edgewhere SAS. All rights reserved.