Hyperledger Composer npm Modules

Hyperledger Composer npm Modules


Hyperledger Composer has 3 main modules for application developers. If you are writing an application this is your entry point.

  1. composer-client

  2. composer-admin

  3. composer-cli

composer-client and composer-admin are the two modules that provide APIs for applications. node.js applications should only use APIs that come from these modules. If there are other APIs that are need please contact us.

Details of all the APIs have been documented in JSDocs (see reference).

composer-client

This module would usually be installed as a local dependency of an application. It provides the API that is used by business applications to connect to a business network to access assets, participants and submitting transactions. When in production this is only module that needs to be added as a direct dependency of the application.

npm install --save composer-client

composer-admin

This module would usually be installed as a local dependency of administrative applications. This API permits the creation of and deployment of business network definitions.

npm install --save composer-admin

composer-cli

This provides command line tools to provide the ability to deploy and managed business network definitions. This would normally be installed as a global module

npm install -g composer-cli

If you wish however you can instgall this as a local dependancy, but you could need to access the cli.js node class directly rather than used the composer command.

composer-report

This provides a basic command line tool to collect diagnostic reports. This would normally only be required if composer-cli could not be installed for any reason.

See the composer report command for more information.