REST control system for Hyperledger Fabric network.
Features
- Invoke and query chaincode
- Chaincode detailed info
- Channels list
- Channel peers
- CA and transactions light cryptography
- ...
Requirements:
- https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html
- https://github.com/hyperledger/fabric-sdk-go
- Go 1.12
Clone repo outside GOPATH in order to go module work correctly.
Build and run
make run
NOTE: only one test network could be up at the same time
Run all unit and end-2-end tests
make test
Stop and clear all test networks
make clear
Start local basic test network
make basic_up
To create and install/instantiate chaincode do POST request to localhost:8080/init_test_fixtures
Run E2E tests against Basic network
make basic_e2e_test
Postman collection
/test/FabricApiBasic.postman_collection.json
Additional requirements:
- qj command-line JSON processor
Start local basic test network
make byfn_up
Run E2E tests against BYFN
make byfn_e2e_test
Postman collection
/test/FabricApiBYFN.postman_collection.json
Start BYFN network with API and demo app at http://localhost:3000/. Also script will register demo user in ORG1 CA with creds - CaUser:password
make demo_light_up
Stop demo app and clear containers
make demo_light_down
Example sequence of actions to interact with standard A to B transfer chaincode:
- "GET TBS CSR /CA/TBSCSR"
- "SIGN TBS CSR"
- "ENROLL TO CA WITH CREDS, TBS CSR AND SIGNATURE - /CA/ENROLL_CSR"
- Fill out five fields with: mychannel / mycc / Org1MSP / query / a
- "CALL /TX/PROPOSAL"
- "SIGN PROPOSAL"
- "QUERY PROPOSAL"
- Fill out five fields with: mychannel / mycc / Org1MSP / invoke / a,b,15
- "CALL /TX/PROPOSAL"
- "SIGN PROPOSAL"
- Fill out endorsement peers with: org1/peer0,org2/peer0
- "GET BROADCAST PAYLOAD (PROPOSAL+ENDORSMENTS)"
- "SIGN BROADCAST PAYLOAD"
- "BROADCAST PAYLOAD WITH SIGNATURE"
After finishing invoke sequence you may run query sequence again, to check out that value have been changed.
- Channels creation
- Network management
- Documentation
- Cover code with unit test (partially done)