Creating a blockchain network

To develop a blockchain network, we will first have to create a business network project using the Yeoman command line, and then name the business network:

$ yo hyperledger-composer
Welcome to the Hyperledger Composer project generator
? Please select the type of project: Business Network
You can run this generator using: 'yo hyperledger-composer:businessnetwork'
Welcome to the business network generator
? Business network name: food-safety-b10407
? Description: Hands-on IoT solutions with Blockchain
? Author name: Maximiliano and Enio
? Author email: [email protected]
? License: Apache-2.0
? Namespace: com.packtpublishing.businessnetwork.foodsafety
? Do you want to generate an empty template network? Yes: generate an empty template network
create package.json
create README.md
create models/com.packtpublishing.businessnetwork.cto
create permissions.acl
create .eslintrc.yml

The Yeoman generator creates a folder with a basic empty structure for a Hyperledger Composer business network.

The .cto file contains the business network definitions: assets, participants, transactions, and queries, whereas the .acl file contains the access control list for the assets and transactions.

In later sections, we're going to code the business network definition, so start Visual Studio Code and open the folder that was created by Yeoman.

To start developing a blockchain solution, open the models/com.packtpublishing.businessnetwork.cto file and start coding.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.27.119