Skip to content

EthVentures/HarborLedger

Repository files navigation

Composer Network (Proposed)

Participants Nonprofit Organizations Medical Providers Government Agencies Refugees

Assets BankAccounts

Transactions Transfer

Events Transaction

Prerequisites

npm install -g composer-cli
  • Hyperledger composer-rest-server
npm install -g composer-rest-server
  • Hyperledger Fabric Tools
/getTools.sh

Starting Fabric

cd fabric-tools
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh

Compile and test Business Network

npm install
npm test

Locate and move Fabric Admin Key and Cert to directory root.

cp fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/<cert> .
cp fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/<key> .

Create and import business network card for Hyperledger Fabric Admin

composer card create -p connection.json -u PeerAdmin -c [email protected] -k <keyfile> -r PeerAdmin -r ChannelAdmin
composer card import -f PeerAdmin\@fabric-network.card

Install run time on peers

composer runtime install -c PeerAdmin@fabric-network -n harbor-ledger-network

Deploying Business Network to Fabric

composer network start -c PeerAdmin@fabric-network -a dist/harbor-ledger-network.bna -A admin -S adminpw

Importing the business network card for the business network administrator

composer card import -f admin\@harbor-ledger-network.card

Generate Rest API

composer-rest-server -c admin@harbor-ledger-network -n never -w true

This will start a rest server listening at: http://localhost:3000

Browse your REST API at http://localhost:3000/explorer

Run API in background

nohup composer-rest-server -c admin@harbor-ledger-network -n never -w true > ~/rest.stdout 2> ~/rest.stderr & disown

Updating Business Network

composer archive create --sourceType dir --sourceName . -a dist/harbor-ledger-network.bna
composer network update -a dist/harbor-ledger-network.bna -c admin@harbor-ledger-network

Tearing Down

To tear down your development session

cd ~/fabric-tools
./stopFabric.sh
./teardownFabric.sh

Team

EthVentures