fabric-samples/full-stack-asset-transfer-guide/applications/conga-cards
dependabot[bot] d3db338e14
Bump the npm_and_yarn group across 2 directories with 11 updates
Bumps the npm_and_yarn group with 7 updates in the /asset-transfer-basic/rest-api-typescript directory:

| Package | From | To |
| --- | --- | --- |
| [express](https://github.com/expressjs/express) | `4.18.2` | `4.20.0` |
| [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) | `7.22.20` | `7.25.6` |
| [@grpc/grpc-js](https://github.com/grpc/grpc-node) | `1.9.3` | `1.9.15` |
| [axios](https://github.com/axios/axios) | `0.21.4` | `1.7.7` |
| [fabric-network](https://github.com/hyperledger/fabric-sdk-node) | `2.2.19` | `2.2.20` |
| [braces](https://github.com/micromatch/braces) | `3.0.2` | `3.0.3` |
| [msgpackr](https://github.com/kriszyp/msgpackr) | `1.9.9` | `1.11.0` |

Bumps the npm_and_yarn group with 1 update in the /full-stack-asset-transfer-guide/applications/conga-cards directory: [axios](https://github.com/axios/axios).


Updates `express` from 4.18.2 to 4.20.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.20.0)

Updates `@babel/traverse` from 7.22.20 to 7.25.6
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.6/packages/babel-traverse)

Updates `@grpc/grpc-js` from 1.9.3 to 1.9.15
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.9.3...@grpc/grpc-js@1.9.15)

Updates `axios` from 0.21.4 to 1.7.7
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.4...v1.7.7)

Updates `fabric-network` from 2.2.19 to 2.2.20
- [Release notes](https://github.com/hyperledger/fabric-sdk-node/releases)
- [Changelog](https://github.com/hyperledger/fabric-sdk-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hyperledger/fabric-sdk-node/compare/v2.2.19...v2.2.20)

Updates `braces` from 3.0.2 to 3.0.3
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

Updates `elliptic` from 6.5.4 to 6.5.7
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.4...v6.5.7)

Updates `follow-redirects` from 1.15.2 to 1.15.9
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.9)

Updates `jsrsasign` from 10.8.6 to 10.9.0
- [Release notes](https://github.com/kjur/jsrsasign/releases)
- [Changelog](https://github.com/kjur/jsrsasign/blob/master/ChangeLog.txt)
- [Commits](https://github.com/kjur/jsrsasign/compare/10.8.6...10.9.0)

Updates `msgpackr` from 1.9.9 to 1.11.0
- [Release notes](https://github.com/kriszyp/msgpackr/releases)
- [Commits](https://github.com/kriszyp/msgpackr/commits)

Updates `path-to-regexp` from 0.1.7 to 0.1.10
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.7...v0.1.10)

Updates `axios` from 0.27.2 to 1.7.7
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.4...v1.7.7)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@babel/traverse"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@grpc/grpc-js"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: axios
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: fabric-network
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: braces
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: elliptic
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: follow-redirects
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: jsrsasign
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: msgpackr
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: path-to-regexp
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: axios
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 03:49:33 +00:00
..
assets Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
hooks Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
images Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
src Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
.eslintrc.js Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
.gitignore Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
.npmrc Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
package.json Bump the npm_and_yarn group across 2 directories with 11 updates 2024-09-13 03:49:33 +00:00
README.md Moves the Full Stack Asset Transfer Development Guide to fabric-samples (#852) 2022-11-10 10:40:27 -05:00
tsconfig.json Use fabric-gateway v1.4 2023-10-25 17:30:29 +09:00

Conga Cards

This Gateway Client application will listen for chaincode events, invoking a #discord webhook to post a channel message when Conga Cards are created, deleted, and exchanged on a channel.

Conga Comics | Life on the chain, one block at a time by Ed Moffatt & some friends

This project is based on the trader-typescript sample Gateway Client application.

Prerequisites

The client application requires Node.js 16 or later.

Set up

The following steps prepare the client application for execution:

  1. Ensure the asset-transfer smart contract is deployed to a running Fabric network.
  2. Run npm install to download dependencies and compile the application code.

Note: After making any code changes to the application, be sure to recompile the application code. This can be done by explicitly running npm install again, or you can leave npm run build:watch running in a terminal window to automatically rebuild the application on any code change.

The client application uses environment variables to supply configuration options. You must set the following environment variables when running the application:

  • ENDPOINT - endpoint address for the Gateway service to which the client will connect in the form hostname:port. Depending on your environment, this can be the address of a specific peer within the user's organization, or an ingress endpoint that dispatches to any available peer in the user's organization.
  • MSP_ID - member service provider ID for the user's organization.
  • CERTIFICATE - PEM file containing the user's X.509 certificate.
  • PRIVATE_KEY - PEM file containing the user's private key.

The following environment variables are optional and can be set if required by your environment:

  • CHANNEL_NAME - Channel to which the chaincode is deployed. (Default: mychannel)

  • CHAINCODE_NAME - Channel to which the chaincode is deployed. (Default: asset-transfer)

  • TLS_CERT - PEM file containing the CA certificate used to authenticate the TLS connection to the Gateway peer. Only required if using a TLS connection and a private CA.

  • HOST_ALIAS - the name of the Gateway peer as it appears in its TLS certificate. Only required if the endpoint address used by the client does not match the address in the Gateway peer's TLS certificate.

  • WEBHOOK_URL - the #discord webhook to which the channel events will be relayed.

Run

The sample application is run as a command-line application, and is lauched using npm start <command> [<arg> ...]. The following commands are available:

  • npm start create <assetId> <ownerName> <color> to create a new asset.
  • npm start delete <assetId> to delete an existing asset.
  • npm start getAllAssets to list all assets.
  • npm start read <assetId> to view an existing asset.
  • npm start transfer <assetId> <ownerName> <ownerMspId> to transfer an asset to a new owner within an organization MSP ID.
  • npm start discord starts an event loop, relaying channel events to ${WEBHOOK_URL}

Sample Interaction:

  • Submit some transactions to a ledger:
npm start create blockbert SeanB orange

npm start create count-blockula jkneubuhl Org1MSP purple

npm start transfer count-blockula davidboswell Org1MSP 
  • Run the discord event listener:
export WEBHOOK_URL="https://discord.com/api/webhooks/123456789/xyzzy-abcdef-12345"

npm start discord

Sample Interaction