{"id":31741327,"url":"https://github.com/bxforce/bnc-hlf","last_synced_at":"2025-10-09T10:51:24.620Z","repository":{"id":49115624,"uuid":"261393301","full_name":"bxforce/bnc-hlf","owner":"bxforce","description":"Blockchain Network Composer for Hyperledger Fabric","archived":false,"fork":false,"pushed_at":"2021-09-06T15:16:05.000Z","size":1257,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-21T20:52:17.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bxforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-05T07:51:52.000Z","updated_at":"2021-09-06T15:16:08.000Z","dependencies_parsed_at":"2022-09-24T02:43:17.844Z","dependency_job_id":null,"html_url":"https://github.com/bxforce/bnc-hlf","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/bxforce/bnc-hlf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxforce%2Fbnc-hlf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxforce%2Fbnc-hlf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxforce%2Fbnc-hlf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxforce%2Fbnc-hlf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bxforce","download_url":"https://codeload.github.com/bxforce/bnc-hlf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxforce%2Fbnc-hlf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001271,"owners_count":26083040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T10:50:56.992Z","updated_at":"2025-10-09T10:51:24.614Z","avatar_url":"https://github.com/bxforce.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# bnc-hlf\n\nBlockchain Network Composer for Hyperledger Fabric.\nBNC is the CLI deployment tools for Enterprise Blockchain projects.\nIt supports mainly Hyperledger Blockchain umbrella.\n\nUsing BNC everyone can easily:\n    \n* Start a network with a configured number of organizations/peers/orderers.\n\n* Deploy, configure and channels\n    \n* Deploy, configure and upgrade chaincodes \n    \n* Add a new organization or a new orderer to the network\n\n## Prerequisites\n\n[Install docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04-fr)\n\n[Install docker-compose](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04-fr)\n\n## Install\n\n````aidl\nsudo curl -L https://raw.githubusercontent.com/bxforce/bnc-hlf/master/bin/bnc -o /usr/local/bin/bnc \u0026\u0026 sudo chmod +x /usr/local/bin/bnc\n````\n\n\n## Getting Started :rocket:\n\n\n### Run default demo\n\nThe following command will start a network of a single orderer _orderer1.bnc.com_ , a single peer _peer1.org1.bnc.com_ and a certificate authority _ca1_.\n\nIt will also deploy the default chaincode  which is the [abstore chaincode](https://github.com/hyperledger/fabric-samples/tree/main/chaincode/abstore) of fabric-samples.\n\nTo start the network run the following command:\n\n\n````aidl\nbnc run\n````\n\nBy running the command above without specifying `--config-folder $PWD` it will take the default [config files](https://github.com/bxforce/bnc-hlf/tree/master/tests/demo).\n\nWe will see how you can use `--config-folder` to provide your own configuration files.\n\n**Shutdown network:**\n\nThe following command will remove all containers and remove the related volumes.\n\n\n````aidl\nbnc rm\n````\n\n### Run your own configuration \n\n#### Step1: Create config files\n\n````aidl\ncurl https://raw.githubusercontent.com/bxforce/bnc-hlf/master/tests/single_machine/config.yaml \u003e config.yaml\n````\n\n#### Step2: Build and run your app \n\n````aidl\nbnc run --config-folder $PWD \n````\n\nThe command above will start a single organization with single peer and orderer.\n\nIt will deploy the default absotre chaincode embedded in the image.\n\n**Shutdown network:**\n\n````aidl\nbnc rm --config-folder $PWD\n````\n\n### Run and configure your own chaincode\n\nIn this section we will explain how to provide your own chaincode.\n\nWe will be running a single org on a single machine.\n\n#### Step1: Create config files\n\n````aidl\ncurl https://raw.githubusercontent.com/bxforce/bnc-hlf/master/tests/single_machine/config.yaml \u003e config.yaml\n````\n\n#### Step2: Configure your own chaincode\n\nOpen the config.yaml file in the config directory with your favorite editor.\n\nIn the chaincode section, notice we have this attribute `root_path_chaincode: \"volume_chaincode\"`\n\nInstead of `_volume_chaincode_` put the absolute path to the folder example: `root_path_chaincode: \"/home/ubuntu/bnc-hlf/tests/chaincode/\"`\n\nNotice we have : _path_chaincode: \"abstore\"_ which is the folder containing your .go files.\n\nNotice we have : _lang_chaincode_ if chaincode is in golang leave it to \"golang\", if it is in nodeJS put: \"node\"\n\nYou can override the default chaincode configuration by passing the flag _-c_ as we will show later\n\n\n#### Step3: Build and run your app\n\nThe following command will start the network and deploy the chaincode\n\n````aidl\nbnc run --config-folder $PWD\n````\n\nIf you want to start your network first, and deploy your chaincode seperately, you can do it like this:\n\n````aidl\nbnc run  --config-folder $PWD --no-chaincode\n````\n\n````aidl\nbnc chaincode deploy --config-folder $PWD\n````\n\nOtherwise you can override the default [chaincode configuration](https://github.com/bxforce/bnc-hlf/blob/master/tests/single_machine/config-chaincode.yaml):\n\n````aidl\nbnc chaincode deploy --config-folder $PWD -c config-chaincode.yaml\n````\n\n#### Step4: Check if its working\n\n````aidl\ndocker ps\n````\n\nYou should be able to see running the orderers/peers configured in the _config.yaml_ file and most importantly you\n\nshould be able to see the _dev-peer_ containers of your chaincode.\n\nIf you want to test your chaincode do the following: (this is testing fabric-samples abstore)\n\n_abstore is just doing init of two variables a,b and then substracting from one or the other a specific value_\n\n ````shell script\nbnc chaincode invoke --config-folder $PWD -i \"Init,a,100,b,100\"\n````\n\nquery chaincode \n\n ````shell script\nbnc chaincode query --config-folder $PWD -i \"query,a\"\n````\n\ncall the invoke fct to move 10 from a to b\n\n ````shell script\nbnc chaincode invoke --config-folder $PWD -i \"invoke,a,b,10\"\n````\n\n#### Step5: Shutdown network\n\nThe following command will remove all containers and remove the related volumes.\n\n````aidl\nbnc rm --config-folder $PWD\n````\n\n## Tutorials :books:\n\n* [Run two org on a single machine](docs/tutorials/two-org-single-machine.md)\n* [Run two org on two machines](docs/tutorials/two-org-two-machine.md)\n* [Add orderer to your running organization](docs/tutorials/add-orderer.md)\n* [Add new organization to your network](docs/tutorials/add-org.md)\n* [Run external chaincode](docs/tutorials/external-chaincode.md) \n\n\n## Contributing\n\n1. Fork it! 🍴\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request 😁 🎉\n\n\n## Credits\n\n- Lead - Wassim Znaidi ([@Wassimz](https://github.com/wassimz))\n- Developer - Ahmed Souissi ([@ahmeds](#))\n- Developer - Sahar Fehri ([@sharf](#))\n- Product owner - Chiraz Chaabane ([@chirazc](#))\n- [@worldsibu](https://github.com/worldsibu) for inspiration and some part of the util code.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxforce%2Fbnc-hlf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbxforce%2Fbnc-hlf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxforce%2Fbnc-hlf/lists"}