npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hyperledger-fabric-example

v0.1.0

Published

Hyperledger Fabric Bootstrap Example

Readme

Pre-requisites

Make sure following tools/runtimes are installed

Install

# Fetch the Hyperledger Farbic tools and docker images
curl -sSL https://goo.gl/iX9dek | bash
# Install typescript & ts-node (globally)
npm install -g ts-node typescript
# Install the dependencies of this project
npm install

Help

To see what are the commands that are available issue:

npm run info

Should see response similar to:

> [email protected] info /Users/ksachdeva/Desktop/Dev/projects/myoss/hyperledger-fabric-example
> npm-scripts-info

info:
  List available script
start-orderer:
  Start the orderer container
stop-orderer:
  Stop the orderer container
start-containers:
  Starts all containers
stop-containers:
  Stops the containers
create-channel:
  Create the Channel
join-channel:
  Join Peers to the channel
install-chaincode:
  Install the chaincode on the peers
instantiate-chaincode:
  Instantiate the chaincode for the channel
invoke-transaction:
  Invoke a transaction
query-chaincode:
  Query the chaincode

Generating the crypto material for all the organizations

See Bootstrapping the Hyperledger Fabric Network (Part 1)

# You will find `cryptogen` in the `bin` folder created in the directory in which you
# executed `curl -sSL https://goo.gl/iX9dek | bash`
cryptogen generate --config=./crypto-config.yaml

Generating the Orderer genesis block

See Bootstrapping the Hyperledger Fabric Network (Part 2)

# You will find `configtxgen` in the `bin` folder created in the directory in which you
# executed `curl -sSL https://goo.gl/iX9dek | bash`
#
# Also make sure to set the FABRIC_CFG_PATH environment variable (it is required by configtxgen tool)
#
export FABRIC_CFG_PATH=$PWD
configtxgen -profile ThreeOrgsOrdererGenesis -outputBlock ./genesis.block

You 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.

npm run start-orderer

Similarly to stop the orderer containers simply issue

npm run stop-orderer

Generating the channel configuration transaction

See Bootstrapping the Hyperledger Fabric Network (Part 3)

configtxgen -profile ThreeOrgsChannel -outputCreateChannelTx ./ksachdeva-exp-channel-1.tx -channelID ksachdeva-exp-channel-1

Creating the new channel

See Bootstrapping the Hyperledger Fabric Network (Part 4)

npm run create-channel

Make Peers join the new channel

See Bootstrapping the Hyperledger Fabric Network (Part 5)

# Stop already running orderer containers
npm run stop-containers
# This will start both orderer & peer containers
npm run start-containers
# Create the channel again as when we start-containers we remove the previous data from the containers
npm run create-channel
# Join the channel
npm run join-channel

Install and instantiate the chaincode

See Bootstrapping the Hyperledger Fabric Network (Part 6)

npm run install-chaincode
npm run instantiate-chaincode

Invoke the transaction & Query the chaincode

See Invoking a transaction on Hyperledger Fabric Network

npm run query-chaincode
npm run invoke-transaction
npm run query-chaincode