-
Notifications
You must be signed in to change notification settings - Fork 0
Brokerage Engine
The blockchain for the Brokerage Engine of AEGIS was developed using Hyperledger Fabric v1.0 and Hyperledger Composer. The network consists of an Orderer, a CA authority, a peer and a CouchDB database for queries. Additional organizations, peers and orderers will be added in future versions.
Detailed installation steps can be found at the AEGIS Network Repository.
Along with the network, a REST API server is installed, allowing to interact with it. The following endpoints are available:
-
Get a list of all users registered with the brokerage engine:
GET /api/User
-
Add a user to the brokerage engine
POST /api/User
Example Body
{ "$class": "eu.aegis.User", "uid": "[email protected]", "balance": "0.0", "externalAssets": [ {} ] }
-
Get user's details:
GET /api/User/{uid}
-
Load currency to the balance of a user:
POST /api/LoadBalance
Example Body
{ "$class": "eu.aegis.LoadBalance", "amount": 0, "user": "eu.aegis.User#[email protected]", "transactionId": "string", "timestamp": "2018-03-21T10:10:29.384Z" }
-
Get a list of all AEGIS assets:
GET /api/AEGISAsset
-
Add an asset to the brokerage engine:
POST /api/AEGISAsset
Example Body
{ "$class": "eu.aegis.AEGISAsset", "aid": "1234", "type": "Dataset", "cost": "0.0", "status": "Free", "exclusivity": "None", "contractText": "Lorem Ipsum...", "owner": "eu.aegis.User#[email protected]" }
-
Get asset’s details:
GET /api/AEGISAsset /{aid}
-
Buy an asset:
POST /api/BuyAsset
Example Body
{ "$class": "eu.aegis.BuyAsset", "buyer": "eu.aegis.User#[email protected]", "relatedAsset": "eu.aegis.AEGISAsset#1234", "transactionId": "string", "timestamp": "2018-03-21T10:10:29.343Z" }
-
Change the cost of an AEGIS asset:
POST /api/ChangeAssetCost
Example Body
{ "$class": "eu.aegis.ChangeAssetCost", "newCost": 0, "relatedAsset": "eu.aegis.AEGISAsset#1234", "transactionId": "string", "timestamp": "2018-03-21T10:10:29.343Z" }
-
Change the status of an AEGIS asset (i.e. free, paid etc):
POST /api/ChangeAssetStatus
Example Body
{ "$class": "eu.aegis.ChangeAssetStatus", "newStatus": "Free", "relatedAsset": "eu.aegis.AEGISAsset#1234", "transactionId": "string", "timestamp": "2018-03-21T10:10:29.356Z" }
-
Change the exclusivity of an AEGIS asset (i.e. none, lifetime etc):
POST /api/ChangeExclusivity
Example Body
{ "$class": "eu.aegis.ChangeExclusivity", "newPeriod": "None", "relatedAsset": "eu.aegis.AEGISAsset#1234", "transactionId": "string", "timestamp": "2018-03-21T10:10:29.368Z" }