fabric-samples/asset-transfer-private-data/chaincode-typescript
Mark S. Lewis f865a9ea51
Fix private-data TypeScript chaincode (#1357)
The build is only testing the Go chaincode for the
asset-transfer-private-data sample. The behavior of the TypeScript
chaincode implementation is not consistent with the Go and Java
versions, which prevents it from working correctly.

This change fixes the TypeScript chaincode implementation for the
asset-transfer-private-data sample so that it works correctly.
Additionally, some JSON property names are explicitly set in the Go
client application sample, which prevented it from working with the Java
and TypeScript chaincode implementations.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2025-11-04 10:55:27 -05:00
..
docker chaincode-typescript 2023-05-17 13:40:30 -04:00
src Fix private-data TypeScript chaincode (#1357) 2025-11-04 10:55:27 -05:00
.dockerignore chaincode-typescript 2023-05-17 13:40:30 -04:00
.gitignore chaincode-typescript 2023-05-17 13:40:30 -04:00
collections_config.json chaincode-typescript 2023-05-17 13:40:30 -04:00
Dockerfile Update runtime and tool versions (#1354) 2025-10-21 13:04:55 -04:00
eslint.config.mjs Update Node chaincode for v2.5.5 release 2024-06-03 15:27:51 -04:00
npm-shrinkwrap.json Fix private-data TypeScript chaincode (#1357) 2025-11-04 10:55:27 -05:00
package.json Fix private-data TypeScript chaincode (#1357) 2025-11-04 10:55:27 -05:00
Readme.md chaincode-typescript 2023-05-17 13:40:30 -04:00
tsconfig.json Update Node chaincode for v2.5.5 release 2024-06-03 15:27:51 -04:00

Usage

This chaincode written for Hyperledger Fabric private data tutorial(https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html).

Deploy chaincode with:

  1. cd fabric-samples/asset-transfer-private-data/chaincode-typescript/
  2. npm install
  3. npm run build
  4. cd fabric-samples/test-network/
  5. ./network.sh deployCC -ccn private -ccp ../asset-transfer-private-data/chaincode-typescript/ -ccl typescript -ccep "OR('Org1MSP.peer','Org2MSP.peer')" -cccg ../asset-transfer-private-data/chaincode-typescript/collections_config.json