A network for trading raw fish and other tasty underwater animals
- A fisher can catch wild fish
- An other fisher can buy fish from a fisher and store it For example, a tuna farmer can buy small tuna for fattening at his farm
- A fisher can measure his fish for stats like weight, amount of fat and body temperature
- A regulator can measure any fish for stats like weight, amount of fat and body temperature
- A regulator can evaluate any fish confirming the legality of it's source and storage
- A buyer can buy evaluated fish from a fisher
- Node 8.16.0
Install required packages by running:
npm i -g [email protected] [email protected] [email protected]
Optionally install VS Code extension Hyperledger Composer
Inside the fabric-scripts
directory, execute the following steps
- Download Fabric images:
./downloadFabric.sh
- Run the start script:
./startFabric.sh
. This will- Start the downloaded Fabric images
- Create a channel named
composerchannel
- Join the peer to that channel
You can stop or destroy the containers by running ./stopFabric.sh
or
./teardownFabric.sh
Create and import the Administrator credentials (Business Network Card)
Make sure no data from previous Composer installations is present
rm -rf ~/.composer
-
Inside the
fabric-scripts
directory run./createPeerAdminCard.sh
- You can list existing BNCs with
composer card list
- You can list existing BNCs with
-
Generate the business network archive (
.bna
or banana file) by running the following inside the root application directorycomposer archive create -t dir -n .
-
Install the generated archive (
[email protected]
) with the Admin credentials:composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]
-
Start the installed network
composer network start --networkName fishy-network --networkVersion 0.0.1 --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
This will generate the Business Network card which can be imported into the playground. You can run the playground client locally with
composer-playground
-
Start the REST server
composer-rest-server -p 5000 -c admin@fishy-network -n always