This project explains how blockchain works in IBM Hypledger Fabric with simple application
In this demo project, I have taken a simple transcation. For example PersonA transfer some amount to Person B an viceversa.
Follow the below link to install hyperledger fabric
pre-requisites:
https://hyperledger.github.io/composer/latest/installing/installing-prereqs
Development Environment
https://hyperledger.github.io/composer/latest/installing/development-tools
- Start the Fabric Server
Open Terminal and Go to fabric-dev-servers location and run ./startFabric.sh
-
Run the docker container
-
Run this command to create the busniess network
composer-playground
-
Deploy a new busniess network
Here I have created demo-test-network
-
Create an asset in the business network
Here I am creating simple asset, Participant and transcation in model like below
In this application asset is Account, participant is Customer and transcation is AccountTransfer
-
Create busniess logic for the transcation between PersonA and PersonB.
-
Make Permissions for the Asset, Participant and Transcation
-
Deploy the changes.
-
Test the changes.
- Create Customer
- Create Account for the customer
- Create Transcation between PersonA and PersonB
Here I have transferred some amount from PersonA to PersonB and viceversa.
-
Export the busniess nextwork from the composer playground portal. Click Export link
demo-test-network.bna
-
Export the busniess card for network install from the composer playground.
In this application, I have created busniess card name as admin@demo-test-network initally.
Also I have created the card from PeerAdmin@hlfv1
demo-test.card
-
Install the busniess network by using this command
composer network install --card PeerAdmin@hlfv1 --archiveFile /path/demo-test-network.bna
-
Run the below command to check the busniess card using REST API.
composer-rest-server
-
Access the busniess card from the frontend. Hyperledger fabric support angular for the frontend.