WHAT WE HAVE:
1.Using ABAC as permission control method,and chaincode is writed with golang.
2.The Hyperledger Fabric network is easily started with a complete shell script.
3.Detailed instructions, easy to understand.
OS | VETSION |
---|---|
mac os | >=10.13 |
ubuntu | 16.04 |
SDK | VERSION |
---|---|
git | >=2.0.0 |
docker | >=19 |
docker-compose | >=1.24 |
node | >=12 |
golang | >=1.10 |
Hyperledger Fabric | >=1.4 |
go get github.com/newham/fabric-iot
|-chaincode....................................chaincode folder
|--go..........................................chaincode in golang
|-client.......................................client of blockchain
|--nodejs......................................code in nodejs of client
|-network......................................fabric-iot network module folder,genesis.block
|--channel-artifacts...........................channel comfig folder
|--compose-files...............................docker-compose folder
|--conn-conf...................................connection config of docker
|--crypto-config...............................certs folder
|--scripts.....................................shell scrpits of cli
|--ccp-generate.sh.............................generate certs and blockchain config shell
|--ccp-template.json...........................json template of connection config
|--ccp-template.yaml...........................template of connection config
|--clear-docker.sh.............................clearn docker images
|--configtx.yaml...............................config of configtxgen
|--crypto-config.yaml..........................config of ccp-generate.sh
|--down.sh.....................................shutdown the network
|--env.sh......................................environment of other shell scripts
|--generate.sh.................................init config
|--install-cc.sh...............................install chaincode
|--rm-cc.sh....................................delete chaincode
|--up.sh.......................................start network
open folder
cd network
run
./generate.sh
cers are saved to crypto-config
./up.sh
./cc-install.sh
./cc-upgrade.sh [new_version]
*chaincode is saved to /chaincode/go
,we only support write code with golang now.
./down.sh
*all the stoped docker containers or images will be delete ,be carefull before you do this
enter the foder
*we have only a client writed by nodejs
cd client/nodejs
install modules of this program
npm install
create admin
node ./enrollAdmin.js
create user by admin
node ./registerUser.js
node ./invoke.js [chaincode_name] [function_name] [args]
©2019 liuhan[liuhanshmtu@163.com] all rights reserved.