The easiest way to see a D-TA in action is to run it in a Docker container. The default settings will run a single D-TA that acts as Principal, Master Fiduciary and Beneficiary. The default settings include an embeded IPFS node connected to a private IPFS network and an embedded “Bolt” database. This will get you up and running quickly but is not recommended for production use!
Please see the repo's README for alternative build instructions.
git clone https://github.com/apache/incubator-milagro-dta.git cd incubator-milagro-dta docker build -t milagrodta . docker run -it -p 5556:5556 milagrodta
Now you can test if the D-TA is running by hitting http://localhost:5556/v1/status
You should see something like...
{ "application": "Milagro Distributed Trust", "timeStamp": "2019-08-29T11:11:15.9089824Z", "apiVersion": "v1", "nodeCID": "QmckgCeQRenUk7WHPcD5fxjLxScxyKp5QY1P7GW69NZnR1", "extensionVendor": "Milagro", "plugin": "milagro" }
Milagro D-TA comes with two aditional plugins out-of-the box, which are intended to demonstrate how it can be extended.
To Run Safeguard Secret
The Safeguard Secret plugin encrypts a string with the public key and decrypts it when the Master Feducuiary returns the secret key.
docker run -it -p 5556:5556 milagrodta -service safeguardsecret
To Run Bitcoin Wallet
Bitcon Wallet uses the public key to create a Bitcoin address. When you want to spend your bitcoins you can get the secret key from the Master Fiduciary
docker run -it -p 5556:5556 milagrodta -service bitcoinwallet
You can confirm that the plugins have loaded by hitting http://localhost:5556/v1/status
The details of the API can be seen here...
Milagro D-TA can easily be integrated with an existing back office system, called from a front-end application or called from CURL, Postman, Swagger etc.
The API has three parts to it:
curl -X POST "http://localhost:5556/v1/identity" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"name\":\"thisNode\"}"