# @worldsibu/convector-tool-chaincode-manager

> Chaincode manager to install and run chaincodes

Latest version **1.3.8** (published 2019-09-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @worldsibu/convector-tool-chaincode-manager
pnpm add @worldsibu/convector-tool-chaincode-manager
yarn add @worldsibu/convector-tool-chaincode-manager
bun add @worldsibu/convector-tool-chaincode-manager
```

Provides the command `chaincode-manager`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.8 |
| Published | 2019-09-03 |
| First published | 2018-06-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 43.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 143 |
| Maintainers | diestrin |
| Keywords | typescript, chaincode, blockchain, hyperledger, solutions, environment, hyperledger fabric, smart contract, run, hurley, composer |

## Links

- npm: https://www.npmjs.com/package/@worldsibu/convector-tool-chaincode-manager
- Repository: https://github.com/hyperledger-labs/convector/tree/develop/%40worldsibu/convector-tool-chaincode-manager
- Homepage: https://worldsibu.tech/convector/convector-smart-contracts/
- npm.io page: https://npm.io/package/@worldsibu/convector-tool-chaincode-manager

## Dependencies (7)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^6.0.1
- [commander](https://npm.io/package/commander.md) ^2.15.1
- [docker-composer-manager](https://npm.io/package/docker-composer-manager.md) ^0.1.3
- [@worldsibu/convector-core](https://npm.io/package/@worldsibu/convector-core.md) ^1.3.8
- [@worldsibu/convector-core-chaincode](https://npm.io/package/@worldsibu/convector-core-chaincode.md) ^1.3.8
- [@worldsibu/convector-common-fabric-helper](https://npm.io/package/@worldsibu/convector-common-fabric-helper.md) ^1.3.8

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.3.8 (latest) — 2019-09-03
- 1.3.10-0-alpha.2486f88c (canary) — 2022-06-02
- 1.3.10-0-alpha.41e75dba — 2022-05-31
- 1.3.10-0-alpha.3f803885 — 2022-05-25
- 1.3.10-0-alpha.32accc48 — 2022-05-25
- 1.3.10-0-alpha.68696fd6 — 2022-05-24
- 1.3.10-0-alpha.b2b47722 — 2022-05-24
- 1.3.10-0-alpha.ab46703c — 2022-05-20
- 1.3.10-0-alpha.d9c98e51 — 2022-05-19
- 1.3.10-0-alpha.74462599 — 2022-05-19
- 1.3.9-0-alpha.013419ca — 2021-08-26
- 1.3.9-0-alpha.09192f1d — 2021-08-26
- 1.3.9-0-alpha.90c7d903 — 2021-02-17
- 1.3.9-0-alpha.b1b143ba — 2021-02-15
- 1.3.9-0-alpha.f9e11059 — 2021-02-12
- … 163 more at https://npm.io/package/@worldsibu/convector-tool-chaincode-manager/versions

## README

# Convector Tool Chaincode Manager

This module contains the chaincode manager with tools to install and run chaincodes in a blockchain. This creates a binary called `chaincode-manager` in the `node_modules/.bin` folder.

## Manager Config

The command relies on a configuration file provided at invocation. The file structure is detailed next:

- `worldsibuNpmToken` - the npm worldsibu token, if you don't have this, means you don't have permission to run our framework and it will fail to install
- `channel` - the channel where the chaincode is gonna be installed
- `peers` - a list of peers information, containing the `url` and a reachable `msp` path
- `orderer` - the orderer information, containing  the `url` and a reachable `msp` path
- `admin` - the user with admin privileges information, containing the user `name`, `mspName`, and `msp` path
- `controllers` - a list of controllers to bound together in the chaincode, containing the npm package `name`, npm package `version` and the `controller` class name found in the package
- `policy` - a policy object, check the fabric sdk [documentation](https://fabric-sdk-node.github.io/global.html#ChaincodeInstantiateUpgradeRequest) for the `endorsement-policy` field for mor information

All paths are resolved relative to the config file.

Here's an example on [how the file looks](https://bitbucket.org/worldsibu/tellus/src/develop/env/chaincode.config.json)

## Manager Commands

- `chaincode-manager install <name> <version>` - install a new for the first time, this can be only executed the first time this chaincode is going to be install using this name
- `chaincode-manager upgrade <name> <version>` - upgrade an existing chaincode
- `chaincode-manager invoke <name> <controller> <function> [args...]` - invoke a function under a controller in a previously installed chaincode
- All the commands demand a `-c ./chaincode.config.json` flag

---
_Source: https://npm.io/package/@worldsibu/convector-tool-chaincode-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
