This repository contains the model and logic files for the AEGIS blockchain. These files are created for use with Hyperledger Composer and Hyperledger Fabric.
-
Install dependencies:
npm install
(in the directory you cloned this repository)
-
Install fabric-tools (required to test with a fabric network)
mkdir fabric-tools && cd fabric-tools
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip
unzip fabric-dev-servers.zip
-
Make sure you have Docker installed, and use run
./downloadFabric.sh
to download the docker images required -
You start and stop the network using
./startFabric.sh
and./stopFabric.sh
-
To control the network, you have to create and install a Peer Admin Card (needed only once, unless you tear down the network):
./createPeerAdminCard.sh
npx composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName aegis-business-network
(inside this repo directory)
Fabric network is now ready.
-
Enter the directory you cloned this repository and create a business network archive:
npx composer archive create -t dir -n .
-
Install the composer runtime:
npx composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName aegis-business-network
-
Deploy the business network to Fabric:
npx composer network start --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw --archiveFile [email protected] --file networkadmin.card
-
Import the network administrator card to Fabric:
npx composer card import --file networkadmin.card
-
To test the network, use:
npx composer network ping --card admin@aegis-business-network
-
If everything is OK, you can start the rest-server and/or the composer playground:
- Rest Server:
npx composer-rest-server -c admin@aegis-business-network -n never -w true
- Playground:
npx composer-playground
- Rest Server: