Hyperledger Sawtooth: Practical example

Kruk Matias
Coinmonks
Dec 16, 2017

--

This example is quite similar than the one explained for Fabric. It’s related to tuna fishing. I’d suggest you following edx course.

Backend Installation

To summary how to install, up and shutdown this example:

  1. Download the docker instance for sawtooth

2. $ docker-compose -f sawtooth-default.yaml up

3. In a new terminal: docker exec -it sawtooth-client-default bash

4. Check is the rest-api reachable: curl http://rest-api:8080/blocks

5. After is finished, the instance can be shut it down simply with: $ docker-compose -f sawtooth-default.yaml down

Javascript project

The project consists in 2 parts: the transaction processor and the client app.

js project structure

Transaction processor installation

In a terminal run the transaction processor.

$ cd sawtooth-tuna
$ cd processor
$ npm install
$ npm start

Client installation

In another terminal run the client app:

$ cd sawtooth-tuna
$ cd client

$ npm install
$ npm run build

Finally start the client simply by opening index.html in any browser window of your choice.

That’s it! You’re with the app ready to roll out.

Get Best Software Deals Directly In Your Inbox

Conclusions

The framework is quite stable, flexible and scalable. I think with Fabric are the most promising frameworks in Hyperledger. Let’s wait in the future, Hyperledger can integrate this set of frameworks with a single core so it’ll be easier to integrate each other.

Click more to read about Hyperledger

--

--