{"id":15015297,"url":"https://github.com/ksachdeva/hyperledger-fabric-example","last_synced_at":"2025-04-12T09:14:12.511Z","repository":{"id":136497638,"uuid":"98057448","full_name":"ksachdeva/hyperledger-fabric-example","owner":"ksachdeva","description":"An example project to support blog posts on Bootstrapping a Hyperleder Fabric network","archived":false,"fork":false,"pushed_at":"2017-09-19T04:54:03.000Z","size":34,"stargazers_count":16,"open_issues_count":3,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T09:14:03.134Z","etag":null,"topics":["fabric","hyperledger","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://ksachdeva.github.com","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/ksachdeva.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-22T20:56:41.000Z","updated_at":"2024-08-14T02:55:58.000Z","dependencies_parsed_at":"2023-07-11T14:34:52.994Z","dependency_job_id":null,"html_url":"https://github.com/ksachdeva/hyperledger-fabric-example","commit_stats":{"total_commits":27,"total_committers":2,"mean_commits":13.5,"dds":0.03703703703703709,"last_synced_commit":"12ac6361bde33956f42607caa1d54bde064a9ebe"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fhyperledger-fabric-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fhyperledger-fabric-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fhyperledger-fabric-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fhyperledger-fabric-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksachdeva","download_url":"https://codeload.github.com/ksachdeva/hyperledger-fabric-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543840,"owners_count":21121838,"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","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":["fabric","hyperledger","nodejs","typescript"],"created_at":"2024-09-24T19:46:43.583Z","updated_at":"2025-04-12T09:14:12.485Z","avatar_url":"https://github.com/ksachdeva.png","language":"TypeScript","readme":"## Pre-requisites\n\nMake sure following tools/runtimes are installed\n* [NodeJS 6.X](https://nodejs.org/en/)\n* [Docker (latest)](https://www.docker.com/)\n\n## Install\n\n```bash\n# Fetch the Hyperledger Farbic tools and docker images\ncurl -sSL https://goo.gl/iX9dek | bash\n```\n\n```bash\n# Install typescript \u0026 ts-node (globally)\nnpm install -g ts-node typescript\n```\n\n```bash\n# Install the dependencies of this project\nnpm install\n```\n\n## Help\n\nTo see what are the commands that are available issue:\n\n```bash\nnpm run info\n```\n\nShould see response similar to:\n```bash\n\u003e hyperledger-fabric-example@0.1.0 info /Users/ksachdeva/Desktop/Dev/projects/myoss/hyperledger-fabric-example\n\u003e npm-scripts-info\n\ninfo:\n  List available script\nstart-orderer:\n  Start the orderer container\nstop-orderer:\n  Stop the orderer container\nstart-containers:\n  Starts all containers\nstop-containers:\n  Stops the containers\ncreate-channel:\n  Create the Channel\njoin-channel:\n  Join Peers to the channel\ninstall-chaincode:\n  Install the chaincode on the peers\ninstantiate-chaincode:\n  Instantiate the chaincode for the channel\ninvoke-transaction:\n  Invoke a transaction\nquery-chaincode:\n  Query the chaincode\n```\n\n#### Generating the crypto material for all the organizations\n\n\nSee [Bootstrapping the Hyperledger Fabric Network (Part 1)](https://ksachdeva.github.io/2017/07/21/bootstrapping-hyperledger-fabric-nw-1/)\n\n```bash\n# You will find `cryptogen` in the `bin` folder created in the directory in which you\n# executed `curl -sSL https://goo.gl/iX9dek | bash`\ncryptogen generate --config=./crypto-config.yaml\n```\n\n#### Generating the Orderer genesis block\n\nSee [Bootstrapping the Hyperledger Fabric Network (Part 2)](https://ksachdeva.github.io/2017/07/21/bootstrapping-hyperledger-fabric-nw-2/)\n\n```bash\n# You will find `configtxgen` in the `bin` folder created in the directory in which you\n# executed `curl -sSL https://goo.gl/iX9dek | bash`\n#\n# Also make sure to set the FABRIC_CFG_PATH environment variable (it is required by configtxgen tool)\n#\nexport FABRIC_CFG_PATH=$PWD\nconfigtxgen -profile ThreeOrgsOrdererGenesis -outputBlock ./genesis.block\n```\n\nYou can directly use the docker-compose command as specified in the blog post or using the command that I have hooked up in the package.json. The npm command also deletes 'production' folder so that every time your start the orderer node it starts with clean content.\n\n```bash\nnpm run start-orderer\n```\n\nSimilarly to stop the orderer containers simply issue\n\n```bash\nnpm run stop-orderer\n```\n\n#### Generating the channel configuration transaction\n\nSee [Bootstrapping the Hyperledger Fabric Network (Part 3)](https://ksachdeva.github.io/2017/07/22/bootstrapping-hyperledger-fabric-nw-3/)\n\n```bash\nconfigtxgen -profile ThreeOrgsChannel -outputCreateChannelTx ./ksachdeva-exp-channel-1.tx -channelID ksachdeva-exp-channel-1\n```\n\n#### Creating the new channel\n\nSee [Bootstrapping the Hyperledger Fabric Network (Part 4)](https://ksachdeva.github.io/2017/07/23/bootstrapping-hyperledger-fabric-nw-4/)\n\n```bash\nnpm run create-channel\n```\n\n#### Make Peers join the new channel\n\nSee [Bootstrapping the Hyperledger Fabric Network (Part 5)](https://ksachdeva.github.io/2017/07/24/bootstrapping-hyperledger-fabric-nw-5/)\n\n```bash\n# Stop already running orderer containers\nnpm run stop-containers\n# This will start both orderer \u0026 peer containers\nnpm run start-containers\n# Create the channel again as when we start-containers we remove the previous data from the containers\nnpm run create-channel\n# Join the channel\nnpm run join-channel\n```\n\n#### Install and instantiate the chaincode\n\nSee [Bootstrapping the Hyperledger Fabric Network (Part 6)](https://ksachdeva.github.io/2017/07/27/bootstrapping-hyperledger-fabric-nw-6/)\n\n```bash\nnpm run install-chaincode\nnpm run instantiate-chaincode\n```\n\n#### Invoke the transaction \u0026 Query the chaincode\n\nSee [Invoking a transaction on Hyperledger Fabric Network](https://ksachdeva.github.io/2017/07/27/invoking-a-transaction-on-fabric/)\n\n```bash\nnpm run query-chaincode\nnpm run invoke-transaction\nnpm run query-chaincode\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksachdeva%2Fhyperledger-fabric-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksachdeva%2Fhyperledger-fabric-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksachdeva%2Fhyperledger-fabric-example/lists"}