From e7b4d3c9c80da0b22cb2fa4be0fed8c279205698 Mon Sep 17 00:00:00 2001 From: Michal Bajer Date: Tue, 17 May 2022 08:52:08 +0000 Subject: [PATCH] refactor(examples): include sample apps in monorepo build - Include discounted-cartrade and electricity trade in monorepo setup, - Update the devcontainer and include new environment setup instructions in BUILD.md, - Fix sample apps build error, - Rename of sample apps to cactus-example-*, - Change any "car" references to "asset" (in code, comments, documentation, etc..), - Rename asset-trade files to match the format of the rest of this repository. - Remove asset-trade eth asset management class and endpoint (not used right now, and it would confuse with fabric asset). - Renamed some uses of cartrade to asset-trade, (more complete changes are included in follow-up commit), - Add indy build artifacts to .gitignore, - Add cmake to devcontainer build (fixed warning during npm dependency build stage), - Fix random whitespace and typos errors, BREAKING CHANGE: building discounted-asset-trade app (or any future app that use indy validator) requires Indy SDK to be installed on the build machine. Closes: 2029 Signed-off-by: Michal Bajer --- .devcontainer/Dockerfile | 17 +- BUILD.md | 25 +- README.md | 16 +- .../.gitignore | 2 +- .../Dockerfile | 4 +- .../README.md | 63 ++- .../balance-management.ts} | 4 +- .../balance.ts | 4 +- .../business-logic-asset-trade.ts} | 92 ++-- ...iness-logic-inquire-asset-trade-status.ts} | 16 +- .../config/contractInfo.yaml | 1 + .../config/default.yaml | 0 .../config/usersetting.yaml | 9 +- .../config/validator-registry-config.yaml | 20 +- .../define.ts | 4 +- .../docker-compose.debug.yml | 2 +- .../docker-compose.yml | 32 +- .../fabric-asset-management.ts} | 18 +- .../fabric-asset.ts} | 40 +- .../image/discounted-asset-trade-image.png} | Bin .../image/indy-setup-schema.svg | 0 .../nginx/nginx.conf | 0 .../package.json | 18 +- .../read-ledger-state.js | 2 +- .../result-transactions-status-data.ts} | 6 +- .../script-cleanup.sh | 4 +- .../script-post-trade-request.sh} | 4 +- .../script-start-ledgers.sh | 2 +- .../template-trade-management.ts} | 4 +- .../template-trade.ts | 4 +- .../trades.ts | 2 +- .../transaction-data.ts} | 4 +- .../transaction-ethereum.ts} | 4 +- .../transaction-fabric.ts} | 16 +- .../transaction-indy.ts} | 4 +- .../transaction-info-management.ts} | 16 +- .../transaction-info.ts} | 8 +- .../transaction-status.ts} | 4 +- .../tsconfig.json | 20 + .../tx-info-data.ts} | 4 +- .../www.ts | 4 +- .../.gitignore | 0 .../BalanceManagement.ts | 0 .../BusinessLogicElectricityTrade.ts | 0 .../Dockerfile | 0 .../MeterInfo.ts | 0 .../MeterManagement.ts | 0 .../README.md | 35 +- .../RequestInfo.ts | 0 .../TransactionEthereum.ts | 0 .../balance.ts | 0 .../config/contractInfo.yaml | 0 .../config/default.yaml | 0 .../config/usersetting.yaml | 0 .../config/validator-registry-config.yaml | 0 .../docker-compose.debug.yml | 2 +- .../docker-compose.yml | 18 +- .../electricity-trade.ts | 0 .../images/electricity-trade-image.png | Bin .../images/electricity-trade-image.pptx | Bin .../package.json | 17 +- .../script-cleanup.sh | 6 +- .../script-gen-electricity-usage.sh | 0 .../script-get-app.sh | 0 .../script-post-setup-request.sh | 0 .../script-post-start-request.sh | 0 .../script-start-ledgers.sh | 0 .../tools/create_batch/create_batch3.py | 0 .../tools/periodicExecuter/package.json | 0 .../periodicExecuter/periodicExecuter.ts | 0 .../tools/periodicExecuter/tsconfig.json | 0 .../transferNumericAsset/config/default.js | 0 .../transferNumericAsset/copyStaticAssets.ts | 0 .../tools/transferNumericAsset/package.json | 0 .../transferNumericAsset.ts | 0 .../tools/transferNumericAsset/tsconfig.json | 0 .../tsconfig.json | 20 + .../tslint.json | 0 .../www.ts | 0 .../discounted-cartrade/AssetManagement.ts | 116 ----- examples/discounted-cartrade/asset.ts | 78 ---- .../config/contractInfo.yaml | 28 -- .../script-build-discounted-cartrade.sh | 9 - examples/discounted-cartrade/tsconfig.json | 88 ---- .../script-build-electricity-trade.sh | 9 - examples/electricity-trade/tsconfig.json | 83 ---- examples/electricity-trade/tslint.json | 28 -- examples/register-indy-data/Dockerfile | 6 +- examples/register-indy-data/README.md | 18 +- ...nted_cartrade.py => register-indy-data.py} | 0 .../register-indy-data/script-build-docker.sh | 4 +- .../cactus_validator_socketio_indy/.gitignore | 1 + .../cactus_validator_socketio_indy/README.md | 4 +- .../src/main/typescript/api-server.ts | 2 +- packages/cactus-cmd-socketio-server/README.md | 4 +- .../config/contractInfo.yaml | 2 +- .../config/default.yaml | 2 +- .../config/usersetting.yaml | 2 +- .../config/validator-registry-config.yaml | 2 +- .../routing-interface/RequestInfo.ts | 2 +- .../README.md | 2 +- .../sample-config/default.yaml | 6 +- .../README.md | 4 +- .../README.md | 2 +- .../asset-transfer-basic-utils/setup.sh | 2 +- tools/docker/indy-testnet/README.md | 2 +- tsconfig.json | 6 + whitepaper/whitepaper.md | 22 +- yarn.lock | 424 ++++++++++++++++-- 109 files changed, 751 insertions(+), 804 deletions(-) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/.gitignore (75%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/Dockerfile (93%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/README.md (55%) rename examples/{discounted-cartrade/BalanceManagement.ts => cactus-example-discounted-asset-trade/balance-management.ts} (96%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/balance.ts (92%) rename examples/{discounted-cartrade/BusinessLogicCartrade.ts => cactus-example-discounted-asset-trade/business-logic-asset-trade.ts} (91%) rename examples/{discounted-cartrade/BusinessLogicInquireCartradeStatus.ts => cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts} (84%) create mode 100644 examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/config/default.yaml (100%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/config/usersetting.yaml (90%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/config/validator-registry-config.yaml (83%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/define.ts (62%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/docker-compose.debug.yml (80%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/docker-compose.yml (77%) rename examples/{discounted-cartrade/CarsManagement.ts => cactus-example-discounted-asset-trade/fabric-asset-management.ts} (83%) rename examples/{discounted-cartrade/cars.ts => cactus-example-discounted-asset-trade/fabric-asset.ts} (59%) rename examples/{discounted-cartrade/image/discounted-cartrade-image.png => cactus-example-discounted-asset-trade/image/discounted-asset-trade-image.png} (100%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/image/indy-setup-schema.svg (100%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/nginx/nginx.conf (100%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/package.json (81%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/read-ledger-state.js (92%) rename examples/{discounted-cartrade/ResultTransactionStatusData.ts => cactus-example-discounted-asset-trade/result-transactions-status-data.ts} (58%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/script-cleanup.sh (74%) rename examples/{discounted-cartrade/script-post-discounted-cartrade-sample.sh => cactus-example-discounted-asset-trade/script-post-trade-request.sh} (76%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/script-start-ledgers.sh (98%) rename examples/{discounted-cartrade/TemplateTradeManagement.ts => cactus-example-discounted-asset-trade/template-trade-management.ts} (97%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/template-trade.ts (96%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/trades.ts (97%) rename examples/{discounted-cartrade/TransactionData.ts => cactus-example-discounted-asset-trade/transaction-data.ts} (80%) rename examples/{discounted-cartrade/TransactionEthereum.ts => cactus-example-discounted-asset-trade/transaction-ethereum.ts} (98%) rename examples/{discounted-cartrade/TransactionFabric.ts => cactus-example-discounted-asset-trade/transaction-fabric.ts} (86%) rename examples/{discounted-cartrade/TransactionIndy.ts => cactus-example-discounted-asset-trade/transaction-indy.ts} (97%) rename examples/{discounted-cartrade/TransactionInfoManagement.ts => cactus-example-discounted-asset-trade/transaction-info-management.ts} (95%) rename examples/{discounted-cartrade/TransactionInfo.ts => cactus-example-discounted-asset-trade/transaction-info.ts} (92%) rename examples/{discounted-cartrade/TransactionStatus.ts => cactus-example-discounted-asset-trade/transaction-status.ts} (67%) create mode 100644 examples/cactus-example-discounted-asset-trade/tsconfig.json rename examples/{discounted-cartrade/TxInfoData.ts => cactus-example-discounted-asset-trade/tx-info-data.ts} (78%) rename examples/{discounted-cartrade => cactus-example-discounted-asset-trade}/www.ts (54%) rename examples/{electricity-trade => cactus-example-electricity-trade}/.gitignore (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/BalanceManagement.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/BusinessLogicElectricityTrade.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/Dockerfile (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/MeterInfo.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/MeterManagement.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/README.md (77%) rename examples/{electricity-trade => cactus-example-electricity-trade}/RequestInfo.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/TransactionEthereum.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/balance.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/config/contractInfo.yaml (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/config/default.yaml (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/config/usersetting.yaml (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/config/validator-registry-config.yaml (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/docker-compose.debug.yml (82%) rename examples/{electricity-trade => cactus-example-electricity-trade}/docker-compose.yml (76%) rename examples/{electricity-trade => cactus-example-electricity-trade}/electricity-trade.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/images/electricity-trade-image.png (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/images/electricity-trade-image.pptx (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/package.json (77%) rename examples/{electricity-trade => cactus-example-electricity-trade}/script-cleanup.sh (82%) rename examples/{electricity-trade => cactus-example-electricity-trade}/script-gen-electricity-usage.sh (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/script-get-app.sh (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/script-post-setup-request.sh (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/script-post-start-request.sh (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/script-start-ledgers.sh (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/create_batch/create_batch3.py (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/periodicExecuter/package.json (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/periodicExecuter/periodicExecuter.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/periodicExecuter/tsconfig.json (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/transferNumericAsset/config/default.js (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/transferNumericAsset/copyStaticAssets.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/transferNumericAsset/package.json (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/transferNumericAsset/transferNumericAsset.ts (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/tools/transferNumericAsset/tsconfig.json (100%) create mode 100644 examples/cactus-example-electricity-trade/tsconfig.json rename examples/{discounted-cartrade => cactus-example-electricity-trade}/tslint.json (100%) rename examples/{electricity-trade => cactus-example-electricity-trade}/www.ts (100%) delete mode 100644 examples/discounted-cartrade/AssetManagement.ts delete mode 100644 examples/discounted-cartrade/asset.ts delete mode 100644 examples/discounted-cartrade/config/contractInfo.yaml delete mode 100755 examples/discounted-cartrade/script-build-discounted-cartrade.sh delete mode 100644 examples/discounted-cartrade/tsconfig.json delete mode 100755 examples/electricity-trade/script-build-electricity-trade.sh delete mode 100644 examples/electricity-trade/tsconfig.json delete mode 100644 examples/electricity-trade/tslint.json rename examples/register-indy-data/{req_discounted_cartrade.py => register-indy-data.py} (100%) create mode 100644 packages-python/cactus_validator_socketio_indy/.gitignore diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8595b3c120..4b5cf9a85c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -35,6 +35,21 @@ RUN apt-get update \ RUN apt-get update \ && apt-get -y install curl git mercurial make binutils bison gcc build-essential +# Install Indy-SDK +# Add Sovrin repository (only bionic release available, but works in recent ubuntu as well) +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 \ + && add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" \ + # Install Indy SDK + && apt-get update \ + && apt-get install -y \ + libindy \ + libnullpay \ + libvcx \ + indy-cli \ + # Remove auto repo entry for focal release (use one from /etc/apt/sources.list) + && rm -f /etc/apt/sources.list.d/sovrin.list* \ + # Clean up + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/ VOLUME [ "/var/lib/docker" ] @@ -46,7 +61,7 @@ CMD [ "sleep", "infinity" ] # [Optional] Uncomment this section to install additional OS packages. RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends openjdk-11-jdk + && apt-get -y install --no-install-recommends openjdk-11-jdk cmake COPY post-create-commands.sh /home/vscode/bin/ diff --git a/BUILD.md b/BUILD.md index 026ed3b138..e4393d3fc0 100644 --- a/BUILD.md +++ b/BUILD.md @@ -88,8 +88,9 @@ The `npm run watch` script in action: ![Fast Developer Flow / Code Iterations](./docs/hyperledger-cactus-watch-script-tutorial-2021-03-06.gif) ## Getting Started - -* Install OS level dependencies: +* Use preset environment: + * [VSCode docker container](./.devcontainer) +* ... or install OS level dependencies manually: * Windows Only * WSL2 or any virtual machine running Ubuntu 20.04 LTS * Git @@ -98,13 +99,15 @@ The `npm run watch` script in action: nvm install 16.14.2 nvm use 16.14.2 ``` - * Yarn + * Yarn * `npm run install-yarn` (from within the project directory) - * [Docker Engine](https://docs.docker.com/engine/install/ubuntu/). Make sure that Docker is working and running, for example, running ``docker ps -aq`` - * Docker Compose - + * [Docker Engine](https://docs.docker.com/engine/install/ubuntu/). Make sure that Docker is working and running, for example, running ``docker ps -aq`` + * Docker Compose * OpenJDK (Corda support Java 8 JDK but do not currently support Java 9 or higher) * `sudo apt install openjdk-8-jdk-headless` + * Indy SDK + * [Installing the SDK](https://github.com/hyperledger/indy-sdk#installing-the-sdk) + * [Build the SDK from source](https://github.com/hyperledger/indy-sdk#how-to-build-indy-sdk-from-source) * Clone the repository @@ -220,16 +223,16 @@ the following decision tree (and keep in mind that we have `npm run watch` too) ## Configuring SSH to use upterm Upload your public key onto github if not done so already. A public key is necessary to join the ssh connection to use upterm. For a comprehensive guide, see the [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent). -Locate the `ci.yml` within `.github/workflows` and add to the `ci.yml` code listed below: +Locate the `ci.yml` within `.github/workflows` and add to the `ci.yml` code listed below: - name: Setup upterm session uses: lhotari/action-upterm@v1 - with: + with: repo-token: ${{ secrets.GITHUB_TOKEN }} -Keep in mind that the SSH upterm session should come after the checkout step (uses: actions/checkout@v2.3.4) to ensure that the CI doesn't hang without before the debugging step occurs. Editing the `ci.yml` will create a new upterm session within `.github/workflows` by adding a new build step. For more details, see the [Debug your GitHub Actions by using ssh](https://github.com/marketplace/actions/debugging-with-ssh). +Keep in mind that the SSH upterm session should come after the checkout step (uses: actions/checkout@v2.3.4) to ensure that the CI doesn't hang without before the debugging step occurs. Editing the `ci.yml` will create a new upterm session within `.github/workflows` by adding a new build step. For more details, see the [Debug your GitHub Actions by using ssh](https://github.com/marketplace/actions/debugging-with-ssh). -By creating a PR for the edited `ci.yml` file, this will the CI to run their tests. There are two ways to navigate to CIs. +By creating a PR for the edited `ci.yml` file, this will the CI to run their tests. There are two ways to navigate to CIs. 1) Go to the PR and click the `checks` tab 2) Go to the `Actions` tab within the main Hyperledger Cactus Repository -Click on the `CI Cactus workflow`. There should be a new job you've created be listed underneath the `build (ubuntu-20.04)` jobs. Click on the the new job (what's you've named your build) and locate the SSH Session within the `Setup Upterm Session` dropdown. Copy the SSH command that start with `ssh` and ends in `.dev` (ex. ssh **********:***********@uptermd.upterm.dev). Open your OS and paste the SSH command script in order to begin an upterm session. \ No newline at end of file +Click on the `CI Cactus workflow`. There should be a new job you've created be listed underneath the `build (ubuntu-20.04)` jobs. Click on the the new job (what's you've named your build) and locate the SSH Session within the `Setup Upterm Session` dropdown. Copy the SSH command that start with `ssh` and ends in `.dev` (ex. ssh **********:***********@uptermd.upterm.dev). Open your OS and paste the SSH command script in order to begin an upterm session. \ No newline at end of file diff --git a/README.md b/README.md index 7dc3da94e8..399f50ef34 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,13 @@ As blockchain technology proliferates, blockchain integration will become an inc Once the last command has finished executing, open link printed on the console with a web browser of your choice -### Discounted Car Trade Example +### Discounted Asset Trade Example -- The guidance is [here](./examples/discounted-cartrade/README.md). +- The guidance is [here](./examples/cactus-example-discounted-asset-trade/README.md). ### Electricity Trade Example -- The guidance is [here](./examples/electricity-trade/README.md). +- The guidance is [here](./examples/cactus-example-electricity-trade/README.md). ## Documentation @@ -62,8 +62,8 @@ Once the last command has finished executing, open link printed on the console w ## Inclusive Language Statement -These guiding principles are very important to the maintainers and therefore -we respectfully ask all contributors to abide by them as well: +These guiding principles are very important to the maintainers and therefore +we respectfully ask all contributors to abide by them as well: - Consider that users who will read the docs are from different backgrounds and cultures and that they have different preferences. @@ -73,9 +73,9 @@ deny list" to "white list and black list". writing inclusive documentation might not look like a huge improvement, it's a first step in the right direction. - We suggest to refer to -[Microsoft bias free writing guidelines](https://docs.microsoft.com/en-us/style-guide/bias-free-communication) -and -[Google inclusive doc writing guide](https://developers.google.com/style/inclusive-documentation) +[Microsoft bias free writing guidelines](https://docs.microsoft.com/en-us/style-guide/bias-free-communication) +and +[Google inclusive doc writing guide](https://developers.google.com/style/inclusive-documentation) as starting points. ## Roadmap diff --git a/examples/discounted-cartrade/.gitignore b/examples/cactus-example-discounted-asset-trade/.gitignore similarity index 75% rename from examples/discounted-cartrade/.gitignore rename to examples/cactus-example-discounted-asset-trade/.gitignore index 10dd13ab16..0be01af9cb 100644 --- a/examples/discounted-cartrade/.gitignore +++ b/examples/cactus-example-discounted-asset-trade/.gitignore @@ -1,5 +1,5 @@ # BLP artifacts -TransactionInfo.json +transaction-Info.json etc/ # don't commit package-lock diff --git a/examples/discounted-cartrade/Dockerfile b/examples/cactus-example-discounted-asset-trade/Dockerfile similarity index 93% rename from examples/discounted-cartrade/Dockerfile rename to examples/cactus-example-discounted-asset-trade/Dockerfile index e7340c65e8..8eed6dea17 100644 --- a/examples/discounted-cartrade/Dockerfile +++ b/examples/cactus-example-discounted-asset-trade/Dockerfile @@ -2,9 +2,9 @@ FROM cactus-cmd-socketio-server:latest ARG NPM_PKG_VERSION=latest -ENV CARTRADE_HOME=/root/cactus +ENV APP_HOME=/root/cactus -WORKDIR ${CARTRADE_HOME} +WORKDIR ${APP_HOME} # Required by indy-sdk RUN apt-get update \ diff --git a/examples/discounted-cartrade/README.md b/examples/cactus-example-discounted-asset-trade/README.md similarity index 55% rename from examples/discounted-cartrade/README.md rename to examples/cactus-example-discounted-asset-trade/README.md index b6019c2b35..2654d1a609 100644 --- a/examples/discounted-cartrade/README.md +++ b/examples/cactus-example-discounted-asset-trade/README.md @@ -1,11 +1,11 @@ -# Cactus discounted-cartrade +# Cactus discounted-asset-trade ## Abstract -Cactus discounted-cartrade is a sample application that adds employee discounts to the original Cactus cartrade. In this application, when the users transfer the car ownership in the cactus cartrade, they present their employee proofs to the rent-a-car company to receive an employee discount. We implement the employee proofs by proofs on Hyperledger Indy. Car ownership is represented by a [asset-transfer-basic](https://github.com/hyperledger/fabric-samples/tree/release-2.2/asset-transfer-basic) chaincodetoken on Hyperledger Fabric, which can be exchanged for ETH currency on a private Ethereum blockchain. This Business Logic Plugin (BLP) application controls a process from employee certification using Hyperledger Indy to payment using Ethereum. +Cactus discounted-asset-trade is a sample application that calculates asset cost based on customer type. In this application, when the users transfer the asset ownership in the cactus discounted-asset-trade, they present their employee proofs to the asset-owner company to receive an employee discount. We implement the employee proofs by proofs on Hyperledger Indy. Asset ownership is represented by a [asset-transfer-basic](https://github.com/hyperledger/fabric-samples/tree/release-2.2/asset-transfer-basic) chaincodetoken on Hyperledger Fabric, which can be exchanged for ETH currency on a private Ethereum blockchain. This Business Logic Plugin (BLP) application controls a process from employee certification using Hyperledger Indy to payment using Ethereum. -![discounted-cartrade image](./image/discounted-cartrade-image.png) +![discounted-asset-trade image](./image/discounted-asset-trade-image.png) ## Scenario @@ -13,7 +13,7 @@ The application works in the following scenario: ### Settings -Alice wants to rent a car using the services of rental car company Thrift Corp. Alice chose this company because she is an employee of Acme Corp., which offers discounts on Thrift Corp.'s services as a benefit. +Alice wants to buy an asset using the services of company Thrift Corp. Alice chose this company because she is an employee of Acme Corp., which offers discounts on Thrift Corp.'s services as a benefit. **Note** : Acme Corp and Thrift Corp have the same names on the sample application on Hyperledger Indy. @@ -23,17 +23,17 @@ Alice knows that Acme Corp. provides digital certificates. She asks Acme Corp. t ### When Alice Uses the Service -Alice will use credentials and other Indy formats such as schema and definition to create an employee proof that she will present when applying the lent-a-car service. Alice then sends a car usage application and her employee proof to the Cactus Node Server via an End User Application. The employee proofs consist of proof requests and proofs on Hyperledger Indy. The Cactus Node server receives the schema and definition from the Indy ledger via Validator and uses this information to verify the proof with the BLP. Once verified, the BLP will decide what she should pay based on the price list and then proceed with the original cartrade application using cactus as an escrow to transfer ETH currencies and car ownership tokens to each other. +Alice will use credentials and other Indy formats such as schema and definition to create an employee proof that she will present when purchasing the asset. Alice then sends a purchase order and her employee proof to the Cactus Node Server via an End User Application. The employee proofs consist of proof requests and proofs on Hyperledger Indy. The Cactus Node server receives the schema and definition from the Indy ledger via Validator and uses this information to verify the proof with the BLP. Once verified, the BLP will decide what she should pay based on the price list and then proceed with the business logic using cactus as an escrow to transfer ETH currencies and asset ownership tokens to each other. ## Setup Overview ### fabric-socketio-validator - Validator for fabric ledger. -- Docker networks: `fabric-all-in-one_testnet-14`, `discounted-cartrade-net` +- Docker networks: `fabric-all-in-one_testnet-2x`, `cactus-example-discounted-asset-trade-net` ### ethereum-validator - Validator for ethereum ledger. -- Docker network: `geth1net`, `discounted-cartrade-net` +- Docker network: `geth1net`, `cactus-example-discounted-asset-trade-net` ### indy-sdk-cli-base-image - Base image for indy validator. @@ -49,19 +49,19 @@ Alice will use credentials and other Indy formats such as schema and definition - Load balancer / gateway for indy validator. - Use it's endpoint to talk to indy validator. - Uses config from `./nginx/nginx.conf` -- Docker network: `indy-testnet_indy_net`, `discounted-cartrade-net` +- Docker network: `indy-testnet_indy_net`, `cactus-example-discounted-asset-trade-net` ### cmd-socketio-base-image -- Base image for `discounted-cartrade` BLP. +- Base image for `cactus-example-discounted-asset-trade` BLP. - Contains cactus cmd socketio server module - It will build the image and immediately exit on run. -### discounted-cartrade-blp +### cactus-example-discounted-asset-trade-blp - Main logic for this sample application. - Use it's endpoint (`localhost:5034`) to interact the bussiness logic. -- Docker network: `discounted-cartrade-net` +- Docker network: `cactus-example-discounted-asset-trade-net` -### req_discounted_cartrade +### register-indy-data - Setup application. - Will generate proof and store it in local configuration on startup. - This application can also be used to send requests to the BLP. @@ -86,15 +86,10 @@ Alice will use credentials and other Indy formats such as schema and definition - (NOTICE: Before executing the above, your account needs to be added to the docker group (`usermod -a -G docker YourAccount` from root user)) - On success, this should start three containers: - `geth1` - - `discounted_cartrade_faio2x_testnet` + - `asset_trade_faio2x_testnet` - `indy-testnet-pool` -1. Build cartrade: - ``` - ./script-build-discounted-cartrade.sh - ``` - -1. Launch cartrade and validators from local `docker-compose.yml` (use separate console for that, docker-compose will block your prompt): +1. Launch discounted-asset-trade and validators from local `docker-compose.yml` (use separate console for that, docker-compose will block your prompt): ``` docker-compose build && docker-compose up # or @@ -104,27 +99,27 @@ Alice will use credentials and other Indy formats such as schema and definition This will build and launch all needed containers, the final output should look like this: ``` - discounted-cartrade-ethereum-validator | listening on *:5050 + cactus-example-discounted-asset-trade-ethereum-validator | listening on *:5050 ... - discounted-cartrade-fabric-socketio-validator | listening on *:5040 + cactus-example-discounted-asset-trade-fabric-socketio-validator | listening on *:5040 ... - discounted-cartrade-indy-validator | 2022-01-31 16:00:49,552 INFO success: validator entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) + cactus-example-discounted-asset-trade-indy-validator | 2022-01-31 16:00:49,552 INFO success: validator entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ... - discounted-cartrade-indy-validator-nginx | 2022/01/31 16:00:49 [notice] 1#1: start worker process 35 + cactus-example-discounted-asset-trade-indy-validator-nginx | 2022/01/31 16:00:49 [notice] 1#1: start worker process 35 ... cmd-socketio-base-dummy exited with code 0 ... indy-sdk-cli-base-dummy exited with code 0 ... - req_discounted_cartrade | Done. - req_discounted_cartrade exited with code 0 + register-indy-data | Done. + register-indy-data exited with code 0 ... - discounted-cartrade-blp | [2022-01-31T16:00:56.208] [INFO] www - listening on *: 5034 + cactus-example-discounted-asset-trade-blp | [2022-01-31T16:00:56.208] [INFO] www - listening on *: 5034 ``` ## How to use this application -1. (Optional) Check the balance on Ethereum and the car ownership on Fabric using the following script: +1. (Optional) Check the balance on Ethereum and the asset ownership on Fabric using the following script: ``` node ./read-ledger-state.js ``` @@ -156,27 +151,27 @@ Alice will use credentials and other Indy formats such as schema and definition 1. Run the transaction execution using the following script: ``` - ./script-post-discounted-cartrade-sample.sh + ./script-post-trade-request.sh ``` ... or send request manually: ``` - docker run --rm -ti -v "$(pwd)/etc/cactus/":"/etc/cactus/" --net="host" req_discounted_cartrade + docker run --rm -ti -v "$(pwd)/etc/cactus/":"/etc/cactus/" --net="host" register-indy-data ``` After this, the transactions are executed by order. When the following log appears on the console where you executed `docker-compose`, the transactions are completed. ``` - [INFO] BusinessLogicCartrade - ##INFO: completed cartrade, businessLogicID: guks32pf, tradeID: *******-001 + [INFO] BusinessLogicAssetTrade - ##INFO: completed asset-trade, businessLogicID: guks32pf, tradeID: *******-001 ``` -1. (Optional) Check the balance on Ethereum and the car ownership on Fabric using the following script +1. (Optional) Check the balance on Ethereum and the asset ownership on Fabric using the following script ``` node ./read-ledger-state.js ``` - The result looks like the following (simplified output). In the following case, 50 coins from `fromAccount` was transferred to `toAccount`, and the car ownership ("owner") was transferred from Brad to Cathy. + The result looks like the following (simplified output). In the following case, 50 coins from `fromAccount` was transferred to `toAccount`, and the asset ownership ("owner") was transferred from Brad to Cathy. ``` # Ethereum fromAccount: @@ -216,8 +211,8 @@ Alice will use credentials and other Indy formats such as schema and definition sudo rm -r ./etc/cactus/ ``` 1. Stop the docker containers of Ethereum, Fabric and Indy - - `docker stop geth1 cartrade_faio2x_testnet indy-testnet-pool` - - `docker rm geth1 cartrade_faio2x_testnet indy-testnet-pool` + - `docker stop geth1 asset_trade_faio2x_testnet indy-testnet-pool` + - `docker rm geth1 asset_trade_faio2x_testnet indy-testnet-pool` 1. Clear indy testnet sandbox ``` diff --git a/examples/discounted-cartrade/BalanceManagement.ts b/examples/cactus-example-discounted-asset-trade/balance-management.ts similarity index 96% rename from examples/discounted-cartrade/BalanceManagement.ts rename to examples/cactus-example-discounted-asset-trade/balance-management.ts index 9c535076ee..7ca7cdc89a 100644 --- a/examples/discounted-cartrade/BalanceManagement.ts +++ b/examples/cactus-example-discounted-asset-trade/balance-management.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * BalanceManagement.ts + * balance-management.ts */ import { LPInfoHolder } from "@hyperledger/cactus-cmd-socket-server"; diff --git a/examples/discounted-cartrade/balance.ts b/examples/cactus-example-discounted-asset-trade/balance.ts similarity index 92% rename from examples/discounted-cartrade/balance.ts rename to examples/cactus-example-discounted-asset-trade/balance.ts index eb8b4720f0..5b069122f8 100644 --- a/examples/discounted-cartrade/balance.ts +++ b/examples/cactus-example-discounted-asset-trade/balance.ts @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * * balance.ts @@ -8,7 +8,7 @@ import { Router, NextFunction, Request, Response } from "express"; import { ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; import { RIFError } from "@hyperledger/cactus-cmd-socket-server"; -import { BalanceManagement } from "./BalanceManagement"; +import { BalanceManagement } from "./balance-management"; const fs = require("fs"); const path = require("path"); diff --git a/examples/discounted-cartrade/BusinessLogicCartrade.ts b/examples/cactus-example-discounted-asset-trade/business-logic-asset-trade.ts similarity index 91% rename from examples/discounted-cartrade/BusinessLogicCartrade.ts rename to examples/cactus-example-discounted-asset-trade/business-logic-asset-trade.ts index 94ab740957..2a0f3b168b 100644 --- a/examples/discounted-cartrade/BusinessLogicCartrade.ts +++ b/examples/cactus-example-discounted-asset-trade/business-logic-asset-trade.ts @@ -1,28 +1,28 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * BusinessLogicCartrade.ts + * business-logic-asset-trade.ts */ import { Request } from "express"; import { RequestInfo } from "@hyperledger/cactus-cmd-socket-server"; import { TradeInfo } from "@hyperledger/cactus-cmd-socket-server"; -import { TransactionInfoManagement } from "./TransactionInfoManagement"; -import { TransactionInfo } from "./TransactionInfo"; -import { TransactionData } from "./TransactionData"; -import { BusinessLogicInquireCartradeStatus } from "./BusinessLogicInquireCartradeStatus"; -import { TxInfoData } from "./TxInfoData"; +import { TransactionInfoManagement } from "./transaction-info-management"; +import { TransactionInfo } from "./transaction-info"; +import { TransactionData } from "./transaction-data"; +import { BusinessLogicInquireAssetTradeStatus } from "./business-logic-inquire-asset-trade-status"; +import { TxInfoData } from "./tx-info-data"; import { routesTransactionManagement } from "@hyperledger/cactus-cmd-socket-server"; import { LedgerOperation } from "@hyperledger/cactus-cmd-socket-server"; import { BusinessLogicBase } from "@hyperledger/cactus-cmd-socket-server"; import { LPInfoHolder } from "@hyperledger/cactus-cmd-socket-server"; -import { makeRawTransaction } from "./TransactionEthereum"; -import { makeSignedProposal } from "./TransactionFabric"; -import { getDataFromIndy } from "./TransactionIndy"; +import { makeRawTransaction } from "./transaction-ethereum"; +import { makeSignedProposal } from "./transaction-fabric"; +import { getDataFromIndy } from "./transaction-indy"; import { LedgerEvent, ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; import { json2str } from "@hyperledger/cactus-cmd-socket-server"; -import { CartradeStatus } from "./define"; +import { AssetTradeStatus } from "./define"; import { VerifierFactory, VerifierFactoryConfig, @@ -35,7 +35,7 @@ const yaml = require("js-yaml"); const config: any = ConfigUtil.getConfig(); import { getLogger } from "log4js"; -const moduleName = "BusinessLogicCartrade"; +const moduleName = "BusinessLogicAssetTrade"; const logger = getLogger(`${moduleName}`); logger.level = config.logLevel; @@ -50,7 +50,7 @@ const assert = require("assert"); const identifierSchema = "schema"; const identifierCredDef = "credDef"; -export class BusinessLogicCartrade extends BusinessLogicBase { +export class BusinessLogicAssetTrade extends BusinessLogicBase { transactionInfoManagement: TransactionInfoManagement; // useValidator: {}; @@ -70,7 +70,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { requestInfo.tradeInfo.fabricAccountFrom = req.body.tradeParams[2]; requestInfo.tradeInfo.fabricAccountTo = req.body.tradeParams[3]; //requestInfo.tradeInfo.tradingValue = req.body.tradeParams[4]; - requestInfo.tradeInfo.carID = req.body.tradeParams[4]; + requestInfo.tradeInfo.assetID = req.body.tradeParams[4]; requestInfo.tradeInfo.proofJson = JSON.parse(req.body.tradeParams[5]); // requestInfo.authInfo.company = req.body.authParams[0]; @@ -99,7 +99,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { // trade status update this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.UnderEscrow + AssetTradeStatus.UnderEscrow ); // Get varidator information @@ -128,7 +128,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.UnderTransfer + AssetTradeStatus.UnderTransfer ); transactionData = new TransactionData("transfer", "ledger002", "tid002"); @@ -139,7 +139,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.UnderSettlement + AssetTradeStatus.UnderSettlement ); transactionData = new TransactionData("settlement", "ledger003", "tid003"); @@ -150,7 +150,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.Completed + AssetTradeStatus.Completed ); } @@ -297,7 +297,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { useValidator["validatorID"][0], ); verifierEthereum.startMonitor( - "BusinessLogicCartrade", + "BusinessLogicAssetTrade", {}, routesTransactionManagement, ); @@ -308,12 +308,12 @@ export class BusinessLogicCartrade extends BusinessLogicBase { `####fromAddress: ${requestInfo.tradeInfo.ethereumAccountFrom}` ); const fromAddressPkey = - config.cartradeInfo.ethereum[ + config.assetTradeInfo.ethereum[ "fromAddressPkey_" + requestInfo.tradeInfo.ethereumAccountFrom ]; logger.debug(`####fromAddressPkey: ${fromAddressPkey}`); // TODO: Get address of escrow and set parameter - const escrowAddress = config.cartradeInfo.ethereum.escrowAddress; + const escrowAddress = config.assetTradeInfo.ethereum.escrowAddress; // Generate parameters for// sendRawTransaction const txParam: { @@ -327,7 +327,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { fromAddressPkey: fromAddressPkey, toAddress: escrowAddress, amount: Number(requestInfo.tradeInfo.tradingValue), - gas: config.cartradeInfo.ethereum.gas, + gas: config.assetTradeInfo.ethereum.gas, }; logger.debug(`####exec makeRawTransaction!!`); makeRawTransaction(txParam) @@ -370,7 +370,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { } secondTransaction( - carID: string, + assetID: string, fabricAccountTo: string, tradeInfo: TradeInfo ) { @@ -390,7 +390,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { useValidator["validatorID"][1], ); verifierFabric.startMonitor( - "BusinessLogicCartrade", + "BusinessLogicAssetTrade", {}, routesTransactionManagement, ); @@ -400,7 +400,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { const ccFncName = "TransferAsset"; const ccArgs: string[] = [ - carID, // CarID + assetID, // assetID fabricAccountTo, // Owner ]; makeSignedProposal(ccFncName, ccArgs, verifierFabric) @@ -471,9 +471,9 @@ export class BusinessLogicCartrade extends BusinessLogicBase { logger.debug("getVerifierEthereum"); // TODO: Get address of escrow and set parameter - const escrowAddress = config.cartradeInfo.ethereum.escrowAddress; + const escrowAddress = config.assetTradeInfo.ethereum.escrowAddress; // TODO: get escrow secret key - const escrowAddressPkey = config.cartradeInfo.ethereum.escrowAddressPkey; + const escrowAddressPkey = config.assetTradeInfo.ethereum.escrowAddressPkey; // Generate parameters for sendRawTransaction const txParam: { @@ -487,7 +487,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { fromAddressPkey: escrowAddressPkey, toAddress: ethereumAccountTo, amount: Number(tradingValue), - gas: config.cartradeInfo.ethereum.gas, + gas: config.assetTradeInfo.ethereum.gas, }; makeRawTransaction(txParam) .then((result) => { @@ -560,10 +560,10 @@ export class BusinessLogicCartrade extends BusinessLogicBase { logger.debug(`##onEvent(): ${json2str(ledgerEvent)}`); switch (ledgerEvent.verifierId) { - case config.cartradeInfo.ethereum.validatorID: + case config.assetTradeInfo.ethereum.validatorID: this.onEvenEtherem(ledgerEvent.data, targetIndex); break; - case config.cartradeInfo.fabric.validatorID: + case config.assetTradeInfo.fabric.validatorID: this.onEvenFabric(ledgerEvent.data, targetIndex); break; default: @@ -682,7 +682,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { this.createTradeInfoFromTransactionInfo(transactionInfo); let txInfoData: TxInfoData; switch (txStatus) { - case CartradeStatus.UnderEscrow: + case AssetTradeStatus.UnderEscrow: // store transaction information in DB txInfoData = new TxInfoData("escrow", json2str(txInfo)); this.transactionInfoManagement.setTxInfo(tradeInfo, txInfoData); @@ -694,15 +694,15 @@ export class BusinessLogicCartrade extends BusinessLogicBase { // const tradeInfo = this.createTradeInfoFromTransactionInfo(transactionInfo); this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.UnderTransfer + AssetTradeStatus.UnderTransfer ); this.secondTransaction( - transactionInfo.carID, + transactionInfo.assetID, transactionInfo.fabricAccountTo, tradeInfo ); break; - case CartradeStatus.UnderTransfer: + case AssetTradeStatus.UnderTransfer: // store transaction information in DB txInfoData = new TxInfoData("transfer", json2str(txInfo)); this.transactionInfoManagement.setTxInfo(tradeInfo, txInfoData); @@ -714,7 +714,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { // const tradeInfo = this.createTradeInfoFromTransactionInfo(transactionInfo); this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.UnderSettlement + AssetTradeStatus.UnderSettlement ); this.thirdTransaction( transactionInfo.ethereumAccountTo, @@ -722,7 +722,7 @@ export class BusinessLogicCartrade extends BusinessLogicBase { tradeInfo ); break; - case CartradeStatus.UnderSettlement: + case AssetTradeStatus.UnderSettlement: // store transaction information in DB txInfoData = new TxInfoData("settlement", json2str(txInfo)); this.transactionInfoManagement.setTxInfo(tradeInfo, txInfoData); @@ -731,14 +731,14 @@ export class BusinessLogicCartrade extends BusinessLogicBase { // const tradeInfo = this.createTradeInfoFromTransactionInfo(transactionInfo); this.transactionInfoManagement.setStatus( tradeInfo, - CartradeStatus.Completed + AssetTradeStatus.Completed ); logger.info( - `##INFO: completed cartrade, businessLogicID: ${transactionInfo.businessLogicID}, tradeID: ${transactionInfo.tradeID}` + `##INFO: completed asset-trade, businessLogicID: ${transactionInfo.businessLogicID}, tradeID: ${transactionInfo.tradeID}` ); this.completedTransaction(tradeInfo); break; - case CartradeStatus.Completed: + case AssetTradeStatus.Completed: logger.warn( `##WARN: already completed, txinfo: ${json2str(transactionInfo)}` ); @@ -767,10 +767,10 @@ export class BusinessLogicCartrade extends BusinessLogicBase { getOperationStatus(tradeID: string): object { logger.debug(`##in getOperationStatus()`); - const businessLogicInquireCartradeStatus: BusinessLogicInquireCartradeStatus = - new BusinessLogicInquireCartradeStatus(); + const businessLogicInquireAssetTradeStatus: BusinessLogicInquireAssetTradeStatus = + new BusinessLogicInquireAssetTradeStatus(); const transactionStatusData = - businessLogicInquireCartradeStatus.getCartradeOperationStatus(tradeID); + businessLogicInquireAssetTradeStatus.getAssetTradeOperationStatus(tradeID); return transactionStatusData; } @@ -783,9 +783,9 @@ export class BusinessLogicCartrade extends BusinessLogicBase { logger.debug(`##event: ${json2str(ledgerEvent)}`); switch (ledgerEvent.verifierId) { - case config.cartradeInfo.ethereum.validatorID: + case config.assetTradeInfo.ethereum.validatorID: return this.getTxIDFromEventEtherem(ledgerEvent.data, targetIndex); - case config.cartradeInfo.fabric.validatorID: + case config.assetTradeInfo.fabric.validatorID: return this.getTxIDFromEventFabric(ledgerEvent.data, targetIndex); default: logger.error( @@ -872,10 +872,10 @@ export class BusinessLogicCartrade extends BusinessLogicBase { try { switch (ledgerEvent.verifierId) { - case config.cartradeInfo.ethereum.validatorID: + case config.assetTradeInfo.ethereum.validatorID: retEventNum = event["blockData"]["transactions"].length; break; - case config.cartradeInfo.fabric.validatorID: + case config.assetTradeInfo.fabric.validatorID: retEventNum = event["blockData"].length; break; default: diff --git a/examples/discounted-cartrade/BusinessLogicInquireCartradeStatus.ts b/examples/cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts similarity index 84% rename from examples/discounted-cartrade/BusinessLogicInquireCartradeStatus.ts rename to examples/cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts index 752f9d05b6..eff6394947 100644 --- a/examples/discounted-cartrade/BusinessLogicInquireCartradeStatus.ts +++ b/examples/cactus-example-discounted-asset-trade/business-logic-inquire-asset-trade-status.ts @@ -1,24 +1,24 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * BusinessLogicInquireCartradeStatus.ts + * business-logic-inquire-asset-trade-status.ts */ -import { TransactionInfo } from "./TransactionInfo"; -import { TransactionStatus } from "./TransactionStatus"; -import { ResultTransactionStatusData } from "./ResultTransactionStatusData"; +import { TransactionInfo } from "./transaction-info"; +import { TransactionStatus } from "./transaction-status"; +import { ResultTransactionStatusData } from "./result-transactions-status-data"; import { BusinessLogicBase } from "@hyperledger/cactus-cmd-socket-server"; import fs = require("fs"); -export class BusinessLogicInquireCartradeStatus extends BusinessLogicBase { - fileName = "TransactionInfo.json"; +export class BusinessLogicInquireAssetTradeStatus extends BusinessLogicBase { + fileName = "transaction-Info.json"; constructor() { super(); } - getCartradeOperationStatus(tradeID: string): object { + getAssetTradeOperationStatus(tradeID: string): object { // Existence check of table file try { fs.statSync(this.fileName); diff --git a/examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml b/examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml new file mode 100644 index 0000000000..fead8e0714 --- /dev/null +++ b/examples/cactus-example-discounted-asset-trade/config/contractInfo.yaml @@ -0,0 +1 @@ +contractInfo: [] diff --git a/examples/discounted-cartrade/config/default.yaml b/examples/cactus-example-discounted-asset-trade/config/default.yaml similarity index 100% rename from examples/discounted-cartrade/config/default.yaml rename to examples/cactus-example-discounted-asset-trade/config/default.yaml diff --git a/examples/discounted-cartrade/config/usersetting.yaml b/examples/cactus-example-discounted-asset-trade/config/usersetting.yaml similarity index 90% rename from examples/discounted-cartrade/config/usersetting.yaml rename to examples/cactus-example-discounted-asset-trade/config/usersetting.yaml index 9e486587d6..870baf0994 100644 --- a/examples/discounted-cartrade/config/usersetting.yaml +++ b/examples/cactus-example-discounted-asset-trade/config/usersetting.yaml @@ -10,18 +10,15 @@ appRouters: - path: /api/v1/bl/trades/ routerJs: /root/cactus/dist/trades.js - - - path: /api/v1/bl/asset/ - routerJs: /root/cactus/dist/asset.js - path: /api/v1/bl/balance/ routerJs: /root/cactus/dist/balance.js - - path: /api/v1/bl/cars/ - routerJs: /root/cactus/dist/cars.js + path: /api/v1/bl/fabric-asset/ + routerJs: /root/cactus/dist/fabric-asset.js # BLP Config -cartradeInfo: +assetTradeInfo: fabric: validatorID: r9IS4dDf mspID: Org1MSP diff --git a/examples/discounted-cartrade/config/validator-registry-config.yaml b/examples/cactus-example-discounted-asset-trade/config/validator-registry-config.yaml similarity index 83% rename from examples/discounted-cartrade/config/validator-registry-config.yaml rename to examples/cactus-example-discounted-asset-trade/config/validator-registry-config.yaml index 742de28c41..9c0fabf439 100644 --- a/examples/discounted-cartrade/config/validator-registry-config.yaml +++ b/examples/cactus-example-discounted-asset-trade/config/validator-registry-config.yaml @@ -51,25 +51,7 @@ ledgerPluginInfo: timeout: 20000 ledgerInfo: ledgerAbstract: Fabric Ledger - apiInfo: - - - apiType: changeCarOwner - requestedData: - - - dataName: carId - dataType: string - - - dataName: newOwner - dataType: string - - - apiType: sendSignedProposal - requestedData: - - - dataName: signedCommitProposal - dataType: string - - - dataName: commitReq - dataType: string + apiInfo: [] - validatorID: 3PfTJw8g diff --git a/examples/discounted-cartrade/define.ts b/examples/cactus-example-discounted-asset-trade/define.ts similarity index 62% rename from examples/discounted-cartrade/define.ts rename to examples/cactus-example-discounted-asset-trade/define.ts index 037a28d929..1abc75c08b 100644 --- a/examples/discounted-cartrade/define.ts +++ b/examples/cactus-example-discounted-asset-trade/define.ts @@ -1,11 +1,11 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * * define.ts */ -export enum CartradeStatus { +export enum AssetTradeStatus { UnderEscrow = 0, UnderTransfer = 1, UnderSettlement = 2, diff --git a/examples/discounted-cartrade/docker-compose.debug.yml b/examples/cactus-example-discounted-asset-trade/docker-compose.debug.yml similarity index 80% rename from examples/discounted-cartrade/docker-compose.debug.yml rename to examples/cactus-example-discounted-asset-trade/docker-compose.debug.yml index faeb4efb7c..b4a0923792 100644 --- a/examples/discounted-cartrade/docker-compose.debug.yml +++ b/examples/cactus-example-discounted-asset-trade/docker-compose.debug.yml @@ -3,7 +3,7 @@ version: "3.4" # Use: docker-compose -f docker-compose.yml -f docker-compose.debug.yml up services: - discounted-cartrade-blp: + cactus-example-discounted-asset-trade-blp: ports: - "9034:9034" command: node --inspect=0.0.0.0:9034 ./dist/www.js \ No newline at end of file diff --git a/examples/discounted-cartrade/docker-compose.yml b/examples/cactus-example-discounted-asset-trade/docker-compose.yml similarity index 77% rename from examples/discounted-cartrade/docker-compose.yml rename to examples/cactus-example-discounted-asset-trade/docker-compose.yml index 94112081b6..32009e9b4f 100644 --- a/examples/discounted-cartrade/docker-compose.yml +++ b/examples/cactus-example-discounted-asset-trade/docker-compose.yml @@ -5,7 +5,7 @@ version: "3.4" services: fabric-socketio-validator: - container_name: discounted-cartrade-fabric-socketio-validator + container_name: cactus-example-discounted-asset-trade-fabric-socketio-validator image: cactus-plugin-ledger-connector-fabric-socketio build: context: ../../packages/cactus-plugin-ledger-connector-fabric-socketio/ @@ -17,10 +17,10 @@ services: target: /etc/cactus networks: - fabric-all-in-one_testnet-2x - - discounted-cartrade-net + - cactus-example-discounted-asset-trade-net ethereum-validator: - container_name: discounted-cartrade-ethereum-validator + container_name: cactus-example-discounted-asset-trade-ethereum-validator image: cactus-plugin-ledger-connector-go-ethereum-socketio build: context: ../../packages/cactus-plugin-ledger-connector-go-ethereum-socketio/ @@ -32,7 +32,7 @@ services: target: /etc/cactus networks: - geth1net - - discounted-cartrade-net + - cactus-example-discounted-asset-trade-net indy-sdk-cli-base-image: # Build base image and immediately exit @@ -43,7 +43,7 @@ services: command: ["echo", "OK - Exit"] indy-validator: - container_name: discounted-cartrade-indy-validator + container_name: cactus-example-discounted-asset-trade-indy-validator image: cactus_validator_socketio_indy environment: - TEST_POOL_IP=172.16.0.2 @@ -62,7 +62,7 @@ services: - indy-testnet_indy_net indy-validator-nginx: - container_name: discounted-cartrade-indy-validator-nginx + container_name: cactus-example-discounted-asset-trade-indy-validator-nginx image: nginx:1.20-alpine volumes: - type: bind @@ -74,7 +74,7 @@ services: - "10080:10080" networks: - indy-testnet_indy_net - - discounted-cartrade-net + - cactus-example-discounted-asset-trade-net cmd-socketio-base-image: # Build base image and immediately exit @@ -84,15 +84,15 @@ services: context: ../../packages/cactus-cmd-socketio-server/ command: ["echo", "OK - Exit"] - discounted-cartrade-blp: - container_name: discounted-cartrade-blp - image: cactus-example-discounted-cartrade-blp + cactus-example-discounted-asset-trade-blp: + container_name: cactus-example-discounted-asset-trade-blp + image: cactus-example-discounted-asset-trade-blp build: context: . ports: - "5034:5034" networks: - - discounted-cartrade-net + - cactus-example-discounted-asset-trade-net depends_on: - fabric-socketio-validator - ethereum-validator @@ -104,9 +104,9 @@ services: source: ./etc/cactus target: /etc/cactus - req_discounted_cartrade: - container_name: req_discounted_cartrade - image: req_discounted_cartrade + register-indy-data: + container_name: register-indy-data + image: register-indy-data environment: - TEST_POOL_IP=172.16.0.2 build: @@ -114,7 +114,7 @@ services: networks: - indy-testnet_indy_net depends_on: - - discounted-cartrade-blp + - cactus-example-discounted-asset-trade-blp volumes: - type: bind source: ./etc/cactus @@ -129,5 +129,5 @@ networks: external: true indy-testnet_indy_net: external: true - discounted-cartrade-net: + cactus-example-discounted-asset-trade-net: driver: bridge diff --git a/examples/discounted-cartrade/CarsManagement.ts b/examples/cactus-example-discounted-asset-trade/fabric-asset-management.ts similarity index 83% rename from examples/discounted-cartrade/CarsManagement.ts rename to examples/cactus-example-discounted-asset-trade/fabric-asset-management.ts index 2a74585280..8a56db2df3 100644 --- a/examples/discounted-cartrade/CarsManagement.ts +++ b/examples/cactus-example-discounted-asset-trade/fabric-asset-management.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * CarsManagement.ts + * fabric-asset-management.ts */ import { LPInfoHolder } from "@hyperledger/cactus-cmd-socket-server"; @@ -14,11 +14,11 @@ import { const config: any = ConfigUtil.getConfig(); import { getLogger } from "log4js"; -const moduleName = "CarsManagement"; +const moduleName = "FabricAssetManagement"; const logger = getLogger(`${moduleName}`); logger.level = config.logLevel; -export class CarsManagement { +export class FabricAssetManagement { private connectInfo: LPInfoHolder = null; // connection information private readonly verifierFactory: VerifierFactory; @@ -30,13 +30,13 @@ export class CarsManagement { ); } - queryCar(carID: string): Promise { + queryAsset(assetID: string): Promise { return new Promise((resolve, reject) => { const contract = { channelName: "mychannel", contractName: "basic" }; const method = { type: "evaluateTransaction", command: "ReadAsset" }; - const args = { args: [carID] }; + const args = { args: [assetID] }; // const method = "default"; - // const args = {"method": {type: "evaluateTransaction", command: "queryCar"},"args": {"args": [carID]}}; + // const args = {"method": {type: "evaluateTransaction", command: "queryAsset"},"args": {"args": [assetID]}}; this.verifierFactory .getVerifier("r9IS4dDf") @@ -51,13 +51,13 @@ export class CarsManagement { }); } - queryAllCars(): Promise { + queryAllAssets(): Promise { return new Promise((resolve, reject) => { const contract = { channelName: "mychannel", contractName: "basic" }; const method = { type: "evaluateTransaction", command: "GetAllAssets" }; const args = { args: [] }; // const method = "default"; - // const args = {"method": {type: "evaluateTransaction", command: "queryAllCars"}, "args": {"args": []}}; + // const args = {"method": {type: "evaluateTransaction", command: "queryAllAssets"}, "args": {"args": []}}; this.verifierFactory .getVerifier("r9IS4dDf") diff --git a/examples/discounted-cartrade/cars.ts b/examples/cactus-example-discounted-asset-trade/fabric-asset.ts similarity index 59% rename from examples/discounted-cartrade/cars.ts rename to examples/cactus-example-discounted-asset-trade/fabric-asset.ts index 9da8c3c2a7..19a74941b1 100644 --- a/examples/discounted-cartrade/cars.ts +++ b/examples/cactus-example-discounted-asset-trade/fabric-asset.ts @@ -1,40 +1,40 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * cars.ts + * fabric-asset.ts */ import { Router, NextFunction, Request, Response } from "express"; import { ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; import { RIFError } from "@hyperledger/cactus-cmd-socket-server"; -import { CarsManagement } from "./CarsManagement"; +import { FabricAssetManagement } from "./fabric-asset-management"; const config: any = ConfigUtil.getConfig(); import { getLogger } from "log4js"; -const moduleName = "cars"; +const moduleName = "fabric-asset"; const logger = getLogger(`${moduleName}`); logger.level = config.logLevel; const router: Router = Router(); -const carsManagement: CarsManagement = new CarsManagement(); +const fabricAssetManagement: FabricAssetManagement = new FabricAssetManagement(); -/* GET query car. */ -router.get("/:carID", (req: Request, res: Response, next: NextFunction) => { +/* GET query asset. */ +router.get("/:assetID", (req: Request, res: Response, next: NextFunction) => { try { - logger.debug(`start queryCar`); + logger.debug(`start queryAsset`); - carsManagement - .queryCar(req.params.carID) + fabricAssetManagement + .queryAsset(req.params.assetID) .then((result) => { - logger.debug("result(queryCar) = " + JSON.stringify(result)); + logger.debug("result(queryAsset) = " + JSON.stringify(result)); res.status(200).json(result); }) .catch((err) => { logger.error(err); }); } catch (err) { - logger.error(`##(queryCar)err name: ${err.constructor.name}`); + logger.error(`##(queryAsset)err name: ${err.constructor.name}`); if (err instanceof RIFError) { logger.debug(`##catch RIFError, ${err.statusCode}, ${err.message}`); @@ -43,27 +43,27 @@ router.get("/:carID", (req: Request, res: Response, next: NextFunction) => { return; } - logger.error(`##err in queryCar: ${err}`); + logger.error(`##err in queryAsset: ${err}`); next(err); } }); -/* GET query all cars. */ +/* GET query all assets. */ router.get("/", (req: Request, res: Response, next: NextFunction) => { try { - logger.debug(`start queryAllCars`); + logger.debug(`start queryAllAssets`); - carsManagement - .queryAllCars() + fabricAssetManagement + .queryAllAssets() .then((result) => { - logger.debug("result(queryAllCars) = " + JSON.stringify(result)); + logger.debug("result(queryAllAssets) = " + JSON.stringify(result)); res.status(200).json(result); }) .catch((err) => { logger.error(err); }); } catch (err) { - logger.error(`##(queryAllCars)err name: ${err.constructor.name}`); + logger.error(`##(queryAllAssets)err name: ${err.constructor.name}`); if (err instanceof RIFError) { logger.debug(`##catch RIFError, ${err.statusCode}, ${err.message}`); @@ -72,7 +72,7 @@ router.get("/", (req: Request, res: Response, next: NextFunction) => { return; } - logger.error(`##err in queryAllCars: ${err}`); + logger.error(`##err in queryAllAssets: ${err}`); next(err); } }); diff --git a/examples/discounted-cartrade/image/discounted-cartrade-image.png b/examples/cactus-example-discounted-asset-trade/image/discounted-asset-trade-image.png similarity index 100% rename from examples/discounted-cartrade/image/discounted-cartrade-image.png rename to examples/cactus-example-discounted-asset-trade/image/discounted-asset-trade-image.png diff --git a/examples/discounted-cartrade/image/indy-setup-schema.svg b/examples/cactus-example-discounted-asset-trade/image/indy-setup-schema.svg similarity index 100% rename from examples/discounted-cartrade/image/indy-setup-schema.svg rename to examples/cactus-example-discounted-asset-trade/image/indy-setup-schema.svg diff --git a/examples/discounted-cartrade/nginx/nginx.conf b/examples/cactus-example-discounted-asset-trade/nginx/nginx.conf similarity index 100% rename from examples/discounted-cartrade/nginx/nginx.conf rename to examples/cactus-example-discounted-asset-trade/nginx/nginx.conf diff --git a/examples/discounted-cartrade/package.json b/examples/cactus-example-discounted-asset-trade/package.json similarity index 81% rename from examples/discounted-cartrade/package.json rename to examples/cactus-example-discounted-asset-trade/package.json index 714a46f7cf..eb5ab4476c 100644 --- a/examples/discounted-cartrade/package.json +++ b/examples/cactus-example-discounted-asset-trade/package.json @@ -1,13 +1,17 @@ { - "name": "discounted-cartrade", + "name": "@hyperledger/cactus-example-discounted-asset-trade", + "version": "1.0.0", + "license": "Apache-2.0", + "main": "dist/www.js", + "module": "dist/www.js", + "types": "dist/www.d.ts", "private": true, "scripts": { "start": "npm run build_pip_indy_package && docker-compose build && docker-compose up", - "build": "npm run build-ts && npm run prepare-docker-build", - "build-ts": "tsc -p ./tsconfig.json", - "tslint": "tslint -c tslint.json -p tsconfig.json './*.ts'", + "build": "npm run build-ts && npm run build:dev:backend:postbuild", + "build-ts": "tsc", "build_pip_indy_package": "cd ../../packages-python/cactus_validator_socketio_indy && python3 setup.py bdist_wheel", - "prepare-docker-build": "npm run copy-yarn-lock && npm run copy-validator-keys", + "build:dev:backend:postbuild": "npm run copy-yarn-lock && npm run copy-validator-keys", "copy-yarn-lock": "cp -f ../../yarn.lock ./dist/", "copy-validator-keys": "npm run copy-fabric-key && npm run copy-ethereum-key && npm run copy-indy-key", "copy-fabric-key": "cp -fr ../../packages/cactus-plugin-ledger-connector-fabric-socketio/sample-config/CA/connector.crt ./dist/fabric-connector.crt", @@ -45,8 +49,6 @@ "eslint": "7.32.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", - "prettier": "2.5.1", - "tslint": "6.0.0", - "typescript": "4.3.5" + "prettier": "2.5.1" } } \ No newline at end of file diff --git a/examples/discounted-cartrade/read-ledger-state.js b/examples/cactus-example-discounted-asset-trade/read-ledger-state.js similarity index 92% rename from examples/discounted-cartrade/read-ledger-state.js rename to examples/cactus-example-discounted-asset-trade/read-ledger-state.js index ba63ad9d83..f98fcceaad 100644 --- a/examples/discounted-cartrade/read-ledger-state.js +++ b/examples/cactus-example-discounted-asset-trade/read-ledger-state.js @@ -16,7 +16,7 @@ async function main() { // Read fabric assets const fabricResponse = await axios.get( - "http://localhost:5034/api/v1/bl/cars/", + "http://localhost:5034/api/v1/bl/fabric-asset/", ); console.log("\n# Fabric:"); console.log(fabricResponse.data.data); diff --git a/examples/discounted-cartrade/ResultTransactionStatusData.ts b/examples/cactus-example-discounted-asset-trade/result-transactions-status-data.ts similarity index 58% rename from examples/discounted-cartrade/ResultTransactionStatusData.ts rename to examples/cactus-example-discounted-asset-trade/result-transactions-status-data.ts index 53304795af..78f64d3c2c 100644 --- a/examples/discounted-cartrade/ResultTransactionStatusData.ts +++ b/examples/cactus-example-discounted-asset-trade/result-transactions-status-data.ts @@ -1,11 +1,11 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * ResultTransactionStatusData.ts + * result-transactions-status-data.ts */ -import { TransactionStatus } from "./TransactionStatus"; +import { TransactionStatus } from "./transaction-status"; export class ResultTransactionStatusData { constructor() { diff --git a/examples/discounted-cartrade/script-cleanup.sh b/examples/cactus-example-discounted-asset-trade/script-cleanup.sh similarity index 74% rename from examples/discounted-cartrade/script-cleanup.sh rename to examples/cactus-example-discounted-asset-trade/script-cleanup.sh index 4022c736b3..c5d586dffb 100755 --- a/examples/discounted-cartrade/script-cleanup.sh +++ b/examples/cactus-example-discounted-asset-trade/script-cleanup.sh @@ -6,8 +6,8 @@ echo ">> Remove the config files on your machine" rm -rf ./etc/cactus/ echo ">> Stop the docker containers of Ethereum, Fabric and Indy" -docker stop geth1 cartrade_faio2x_testnet indy-testnet-pool -docker rm geth1 cartrade_faio2x_testnet indy-testnet-pool +docker stop geth1 asset_trade_faio2x_testnet indy-testnet-pool +docker rm geth1 asset_trade_faio2x_testnet indy-testnet-pool echo ">> Clear indy testnet sandbox" pushd ../../tools/docker/indy-testnet/ diff --git a/examples/discounted-cartrade/script-post-discounted-cartrade-sample.sh b/examples/cactus-example-discounted-asset-trade/script-post-trade-request.sh similarity index 76% rename from examples/discounted-cartrade/script-post-discounted-cartrade-sample.sh rename to examples/cactus-example-discounted-asset-trade/script-post-trade-request.sh index 70b7b2189b..08c56e455b 100755 --- a/examples/discounted-cartrade/script-post-discounted-cartrade-sample.sh +++ b/examples/cactus-example-discounted-asset-trade/script-post-trade-request.sh @@ -2,9 +2,9 @@ # Copyright 2020-2022 Hyperledger Cactus Contributors # SPDX-License-Identifier: Apache-2.0 -echo "Run req_discounted_cartrade " +echo "Run register-indy-data " docker run --rm \ -ti \ -v "$(pwd)/etc/cactus/":"/etc/cactus/" \ --net="host" \ - req_discounted_cartrade + register-indy-data diff --git a/examples/discounted-cartrade/script-start-ledgers.sh b/examples/cactus-example-discounted-asset-trade/script-start-ledgers.sh similarity index 98% rename from examples/discounted-cartrade/script-start-ledgers.sh rename to examples/cactus-example-discounted-asset-trade/script-start-ledgers.sh index 18afaf9524..9dda439b08 100755 --- a/examples/discounted-cartrade/script-start-ledgers.sh +++ b/examples/cactus-example-discounted-asset-trade/script-start-ledgers.sh @@ -9,7 +9,7 @@ WAIT_TIME=30 # How often to check container status CONFIG_VOLUME_PATH="./etc/cactus" # Docker volume with shared configuration # Fabric Env Variables -export CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME="cartrade_faio2x_testnet" +export CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME="asset_trade_faio2x_testnet" export CACTUS_FABRIC_ALL_IN_ONE_VERSION="2.2.0" export CACTUS_FABRIC_TEST_LOOSE_MEMBERSHIP=1 diff --git a/examples/discounted-cartrade/TemplateTradeManagement.ts b/examples/cactus-example-discounted-asset-trade/template-trade-management.ts similarity index 97% rename from examples/discounted-cartrade/TemplateTradeManagement.ts rename to examples/cactus-example-discounted-asset-trade/template-trade-management.ts index 6f5d70996c..4b62db1c88 100644 --- a/examples/discounted-cartrade/TemplateTradeManagement.ts +++ b/examples/cactus-example-discounted-asset-trade/template-trade-management.ts @@ -1,8 +1,8 @@ /* - * Copyright 2021 Hyperledger Cactus Contributors + * Copyright 2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TemplateTradeManagement.ts + * template-trade-management.ts */ import { Request } from "express"; diff --git a/examples/discounted-cartrade/template-trade.ts b/examples/cactus-example-discounted-asset-trade/template-trade.ts similarity index 96% rename from examples/discounted-cartrade/template-trade.ts rename to examples/cactus-example-discounted-asset-trade/template-trade.ts index 6c8a9e5f57..e7555d07d8 100644 --- a/examples/discounted-cartrade/template-trade.ts +++ b/examples/cactus-example-discounted-asset-trade/template-trade.ts @@ -1,5 +1,5 @@ /* - * Copyright 2021 Hyperledger Cactus Contributors + * Copyright 2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * * template-trade.ts @@ -8,7 +8,7 @@ import { Router, NextFunction, Request, Response } from "express"; import { ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; import { RIFError } from "@hyperledger/cactus-cmd-socket-server"; -import { TemplateTradeManagement } from "./TemplateTradeManagement"; +import { TemplateTradeManagement } from "./template-trade-management"; const fs = require("fs"); const path = require("path"); diff --git a/examples/discounted-cartrade/trades.ts b/examples/cactus-example-discounted-asset-trade/trades.ts similarity index 97% rename from examples/discounted-cartrade/trades.ts rename to examples/cactus-example-discounted-asset-trade/trades.ts index 1f7acac8de..02bd59bcb4 100644 --- a/examples/discounted-cartrade/trades.ts +++ b/examples/cactus-example-discounted-asset-trade/trades.ts @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * * trades.ts diff --git a/examples/discounted-cartrade/TransactionData.ts b/examples/cactus-example-discounted-asset-trade/transaction-data.ts similarity index 80% rename from examples/discounted-cartrade/TransactionData.ts rename to examples/cactus-example-discounted-asset-trade/transaction-data.ts index fe642dc193..1638f063d0 100644 --- a/examples/discounted-cartrade/TransactionData.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-data.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionData.ts + * transaction-data.ts */ export class TransactionData { diff --git a/examples/discounted-cartrade/TransactionEthereum.ts b/examples/cactus-example-discounted-asset-trade/transaction-ethereum.ts similarity index 98% rename from examples/discounted-cartrade/TransactionEthereum.ts rename to examples/cactus-example-discounted-asset-trade/transaction-ethereum.ts index b955267a71..1d3de4267e 100644 --- a/examples/discounted-cartrade/TransactionEthereum.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-ethereum.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionEthereum.ts + * transaction-ethereum.ts */ import { diff --git a/examples/discounted-cartrade/TransactionFabric.ts b/examples/cactus-example-discounted-asset-trade/transaction-fabric.ts similarity index 86% rename from examples/discounted-cartrade/TransactionFabric.ts rename to examples/cactus-example-discounted-asset-trade/transaction-fabric.ts index def388076e..d2a1492ce2 100644 --- a/examples/discounted-cartrade/TransactionFabric.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-fabric.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionFabric.ts + * transaction-fabric.ts */ //////// @@ -48,17 +48,17 @@ export function makeSignedProposal( const transactionProposalReq = { fcn: ccFncName, // Chaincode function name args: ccArgs, // Chaincode argument - chaincodeId: config.cartradeInfo.fabric.chaincodeID, - channelId: config.cartradeInfo.fabric.channelName, + chaincodeId: config.assetTradeInfo.fabric.chaincodeID, + channelId: config.assetTradeInfo.fabric.channelName, }; logger.debug(transactionProposalReq); // Get certificate and key acquisition let certPem = undefined; let privateKeyPem = undefined; - const submitter = config.cartradeInfo.fabric.submitter.name; - const wallet = new FileSystemWallet(config.cartradeInfo.fabric.keystore); - logger.debug(`Wallet path: ${config.cartradeInfo.fabric.keystore}`); + const submitter = config.assetTradeInfo.fabric.submitter.name; + const wallet = new FileSystemWallet(config.assetTradeInfo.fabric.keystore); + logger.debug(`Wallet path: ${config.assetTradeInfo.fabric.keystore}`); const submitterExists = await wallet.exists(submitter); if (submitterExists) { @@ -68,7 +68,7 @@ export function makeSignedProposal( } // const signedTx = await TransactionSigner.signTxFabric(transactionProposalReq, certPem, privateKeyPem); - const contract = { channelName: config.cartradeInfo.fabric.channelName }; + const contract = { channelName: config.assetTradeInfo.fabric.channelName }; const method = { type: "function", command: "sendSignedProposal" }; const template = "default"; const argsParam: {} = { diff --git a/examples/discounted-cartrade/TransactionIndy.ts b/examples/cactus-example-discounted-asset-trade/transaction-indy.ts similarity index 97% rename from examples/discounted-cartrade/TransactionIndy.ts rename to examples/cactus-example-discounted-asset-trade/transaction-indy.ts index a4c30c248e..6452359373 100644 --- a/examples/discounted-cartrade/TransactionIndy.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-indy.ts @@ -1,8 +1,8 @@ /* - * Copyright 2021 Hyperledger Cactus Contributors + * Copyright 2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionIndy.ts + * transaction-indy.ts */ import { diff --git a/examples/discounted-cartrade/TransactionInfoManagement.ts b/examples/cactus-example-discounted-asset-trade/transaction-info-management.ts similarity index 95% rename from examples/discounted-cartrade/TransactionInfoManagement.ts rename to examples/cactus-example-discounted-asset-trade/transaction-info-management.ts index f6c4a2e2a7..6b05f65b8b 100644 --- a/examples/discounted-cartrade/TransactionInfoManagement.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-info-management.ts @@ -1,15 +1,15 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionInfoManagement.ts + * transaction-info-management.ts */ -import { TransactionInfo } from "./TransactionInfo"; -import { TransactionData } from "./TransactionData"; -import { TxInfoData } from "./TxInfoData"; +import { TransactionInfo } from "./transaction-info"; +import { TransactionData } from "./transaction-data"; +import { TxInfoData } from "./tx-info-data"; import { TradeInfo, ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; -import { CartradeStatus } from "./define"; +import { AssetTradeStatus } from "./define"; const fs = require("fs"); const path = require("path"); @@ -23,7 +23,7 @@ logger.level = config.logLevel; // Transaction Information Management Class export class TransactionInfoManagement { - fileName = "TransactionInfo.json"; + fileName = "transaction-Info.json"; constructor() {} @@ -66,7 +66,7 @@ export class TransactionInfoManagement { this.fileDump(); } - setStatus(tradeInfo: TradeInfo, status: CartradeStatus) { + setStatus(tradeInfo: TradeInfo, status: AssetTradeStatus) { // Existence check of table file try { fs.statSync(this.fileName); diff --git a/examples/discounted-cartrade/TransactionInfo.ts b/examples/cactus-example-discounted-asset-trade/transaction-info.ts similarity index 92% rename from examples/discounted-cartrade/TransactionInfo.ts rename to examples/cactus-example-discounted-asset-trade/transaction-info.ts index d879d5ca48..c8f999b4ce 100644 --- a/examples/discounted-cartrade/TransactionInfo.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-info.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionInfo.ts + * transaction-info.ts */ import { RequestInfo } from "@hyperledger/cactus-cmd-socket-server"; @@ -19,7 +19,7 @@ export class TransactionInfo { fabricAccountFromKey: string; fabricAccountToKey: string; tradingValue: string; - carID: string; + assetID: string; status: number; escrowLedger: string; escrowTxID: string; @@ -42,7 +42,7 @@ export class TransactionInfo { this.fabricAccountFrom = requestInfo.tradeInfo.fabricAccountFrom; this.fabricAccountTo = requestInfo.tradeInfo.fabricAccountTo; this.tradingValue = requestInfo.tradeInfo.tradingValue; - this.carID = requestInfo.tradeInfo.carID; + this.assetID = requestInfo.tradeInfo.assetID; // mode check if (mode === 0) { diff --git a/examples/discounted-cartrade/TransactionStatus.ts b/examples/cactus-example-discounted-asset-trade/transaction-status.ts similarity index 67% rename from examples/discounted-cartrade/TransactionStatus.ts rename to examples/cactus-example-discounted-asset-trade/transaction-status.ts index f3bd6e165b..f9118efa05 100644 --- a/examples/discounted-cartrade/TransactionStatus.ts +++ b/examples/cactus-example-discounted-asset-trade/transaction-status.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TransactionStatus.ts + * transaction-status.ts */ export class TransactionStatus { diff --git a/examples/cactus-example-discounted-asset-trade/tsconfig.json b/examples/cactus-example-discounted-asset-trade/tsconfig.json new file mode 100644 index 0000000000..42f82ee7c4 --- /dev/null +++ b/examples/cactus-example-discounted-asset-trade/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./dist/", + "tsBuildInfoFile": "../../.build-cache/cactus-example-discounted-asset-trade.tsbuildinfo", + "strict": false // TODO - true, fix warnings + }, + "include": [ + "./*.ts", + ], + "references": [ + { + "path": "../../packages/cactus-cmd-socketio-server/tsconfig.json" + }, + { + "path": "../../packages/cactus-verifier-client/tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/examples/discounted-cartrade/TxInfoData.ts b/examples/cactus-example-discounted-asset-trade/tx-info-data.ts similarity index 78% rename from examples/discounted-cartrade/TxInfoData.ts rename to examples/cactus-example-discounted-asset-trade/tx-info-data.ts index 3f8c25b8a5..ad0122e46b 100644 --- a/examples/discounted-cartrade/TxInfoData.ts +++ b/examples/cactus-example-discounted-asset-trade/tx-info-data.ts @@ -1,8 +1,8 @@ /* - * Copyright 2020-2021 Hyperledger Cactus Contributors + * Copyright 2020-2022 Hyperledger Cactus Contributors * SPDX-License-Identifier: Apache-2.0 * - * TxInfoData.ts + * tx-info-data.ts */ export class TxInfoData { diff --git a/examples/discounted-cartrade/www.ts b/examples/cactus-example-discounted-asset-trade/www.ts similarity index 54% rename from examples/discounted-cartrade/www.ts rename to examples/cactus-example-discounted-asset-trade/www.ts index 8c6c12b882..529f8bd14f 100644 --- a/examples/discounted-cartrade/www.ts +++ b/examples/cactus-example-discounted-asset-trade/www.ts @@ -1,7 +1,7 @@ -import { BusinessLogicCartrade } from "./BusinessLogicCartrade"; +import { BusinessLogicAssetTrade } from "./business-logic-asset-trade"; import { startCactusSocketIOServer } from "@hyperledger/cactus-cmd-socket-server"; startCactusSocketIOServer({ id: "guks32pf", - plugin: new BusinessLogicCartrade(), + plugin: new BusinessLogicAssetTrade(), }); diff --git a/examples/electricity-trade/.gitignore b/examples/cactus-example-electricity-trade/.gitignore similarity index 100% rename from examples/electricity-trade/.gitignore rename to examples/cactus-example-electricity-trade/.gitignore diff --git a/examples/electricity-trade/BalanceManagement.ts b/examples/cactus-example-electricity-trade/BalanceManagement.ts similarity index 100% rename from examples/electricity-trade/BalanceManagement.ts rename to examples/cactus-example-electricity-trade/BalanceManagement.ts diff --git a/examples/electricity-trade/BusinessLogicElectricityTrade.ts b/examples/cactus-example-electricity-trade/BusinessLogicElectricityTrade.ts similarity index 100% rename from examples/electricity-trade/BusinessLogicElectricityTrade.ts rename to examples/cactus-example-electricity-trade/BusinessLogicElectricityTrade.ts diff --git a/examples/electricity-trade/Dockerfile b/examples/cactus-example-electricity-trade/Dockerfile similarity index 100% rename from examples/electricity-trade/Dockerfile rename to examples/cactus-example-electricity-trade/Dockerfile diff --git a/examples/electricity-trade/MeterInfo.ts b/examples/cactus-example-electricity-trade/MeterInfo.ts similarity index 100% rename from examples/electricity-trade/MeterInfo.ts rename to examples/cactus-example-electricity-trade/MeterInfo.ts diff --git a/examples/electricity-trade/MeterManagement.ts b/examples/cactus-example-electricity-trade/MeterManagement.ts similarity index 100% rename from examples/electricity-trade/MeterManagement.ts rename to examples/cactus-example-electricity-trade/MeterManagement.ts diff --git a/examples/electricity-trade/README.md b/examples/cactus-example-electricity-trade/README.md similarity index 77% rename from examples/electricity-trade/README.md rename to examples/cactus-example-electricity-trade/README.md index 6b6bd5ebfc..3b1c8ce174 100644 --- a/examples/electricity-trade/README.md +++ b/examples/cactus-example-electricity-trade/README.md @@ -48,11 +48,6 @@ In this example, we use the Sawtooth intkey transaction processor as an applicat - `sawtooth-validator-default` - `geth1` -1. Build electricity-trade: - ``` - ./script-build-electricity-trade.sh - ``` - 1. Launch electricity-trade and validators from local `docker-compose.yml` (use separate console for that, docker-compose will block your prompt): ``` docker-compose build && docker-compose up @@ -65,21 +60,21 @@ In this example, we use the Sawtooth intkey transaction processor as an applicat ``` cmd-socketio-base-dummy | OK - Exit cmd-socketio-base-dummy exited with code 0 - electricity-trade-ethereum-validator | - electricity-trade-ethereum-validator | > @hyperledger/cactus-plugin-ledger-connector-go-ethereum-socketio@1.0.0-rc.3 start /root/cactus - electricity-trade-ethereum-validator | > cd ./dist && node common/core/bin/www.js - electricity-trade-ethereum-validator | - electricity-trade-ethereum-validator | listening on *:5050 - electricity-trade-sawtooth-validator | - electricity-trade-sawtooth-validator | > @hyperledger/cactus-plugin-ledger-connector-sawtooth-socketio@1.0.0-rc.3 start /root/cactus - electricity-trade-sawtooth-validator | > cd ./dist && node common/core/bin/www.js - electricity-trade-sawtooth-validator | - electricity-trade-sawtooth-validator | listening on *:5140 - electricity-trade-blp | [2022-02-14T15:47:47.312] [INFO] www - Using BLP with id = h40Q9eMD - electricity-trade-blp | start Dynamic loading. - electricity-trade-blp | path: /api/v1/bl/electricity-trade/, routerJs: /root/cactus/dist/electricity-trade.js - electricity-trade-blp | path: /api/v1/bl/balance/, routerJs: /root/cactus/dist/balance.js - electricity-trade-blp | [2022-02-14T15:47:47.399] [INFO] www - listening on *: 5034 + cactus-example-electricity-trade-ethereum-validator | + cactus-example-electricity-trade-ethereum-validator | > @hyperledger/cactus-plugin-ledger-connector-go-ethereum-socketio@1.0.0-rc.3 start /root/cactus + cactus-example-electricity-trade-ethereum-validator | > cd ./dist && node common/core/bin/www.js + cactus-example-electricity-trade-ethereum-validator | + cactus-example-electricity-trade-ethereum-validator | listening on *:5050 + cactus-example-electricity-trade-sawtooth-validator | + cactus-example-electricity-trade-sawtooth-validator | > @hyperledger/cactus-plugin-ledger-connector-sawtooth-socketio@1.0.0-rc.3 start /root/cactus + cactus-example-electricity-trade-sawtooth-validator | > cd ./dist && node common/core/bin/www.js + cactus-example-electricity-trade-sawtooth-validator | + cactus-example-electricity-trade-sawtooth-validator | listening on *:5140 + cactus-example-electricity-trade-blp | [2022-02-14T15:47:47.312] [INFO] www - Using BLP with id = h40Q9eMD + cactus-example-electricity-trade-blp | start Dynamic loading. + cactus-example-electricity-trade-blp | path: /api/v1/bl/cactus-example-electricity-trade/, routerJs: /root/cactus/dist/cactus-example-electricity-trade.js + cactus-example-electricity-trade-blp | path: /api/v1/bl/balance/, routerJs: /root/cactus/dist/balance.js + cactus-example-electricity-trade-blp | [2022-02-14T15:47:47.399] [INFO] www - listening on *: 5034 ``` ## How to use this application diff --git a/examples/electricity-trade/RequestInfo.ts b/examples/cactus-example-electricity-trade/RequestInfo.ts similarity index 100% rename from examples/electricity-trade/RequestInfo.ts rename to examples/cactus-example-electricity-trade/RequestInfo.ts diff --git a/examples/electricity-trade/TransactionEthereum.ts b/examples/cactus-example-electricity-trade/TransactionEthereum.ts similarity index 100% rename from examples/electricity-trade/TransactionEthereum.ts rename to examples/cactus-example-electricity-trade/TransactionEthereum.ts diff --git a/examples/electricity-trade/balance.ts b/examples/cactus-example-electricity-trade/balance.ts similarity index 100% rename from examples/electricity-trade/balance.ts rename to examples/cactus-example-electricity-trade/balance.ts diff --git a/examples/electricity-trade/config/contractInfo.yaml b/examples/cactus-example-electricity-trade/config/contractInfo.yaml similarity index 100% rename from examples/electricity-trade/config/contractInfo.yaml rename to examples/cactus-example-electricity-trade/config/contractInfo.yaml diff --git a/examples/electricity-trade/config/default.yaml b/examples/cactus-example-electricity-trade/config/default.yaml similarity index 100% rename from examples/electricity-trade/config/default.yaml rename to examples/cactus-example-electricity-trade/config/default.yaml diff --git a/examples/electricity-trade/config/usersetting.yaml b/examples/cactus-example-electricity-trade/config/usersetting.yaml similarity index 100% rename from examples/electricity-trade/config/usersetting.yaml rename to examples/cactus-example-electricity-trade/config/usersetting.yaml diff --git a/examples/electricity-trade/config/validator-registry-config.yaml b/examples/cactus-example-electricity-trade/config/validator-registry-config.yaml similarity index 100% rename from examples/electricity-trade/config/validator-registry-config.yaml rename to examples/cactus-example-electricity-trade/config/validator-registry-config.yaml diff --git a/examples/electricity-trade/docker-compose.debug.yml b/examples/cactus-example-electricity-trade/docker-compose.debug.yml similarity index 82% rename from examples/electricity-trade/docker-compose.debug.yml rename to examples/cactus-example-electricity-trade/docker-compose.debug.yml index 7aa3c43985..bd8f1b63a9 100644 --- a/examples/electricity-trade/docker-compose.debug.yml +++ b/examples/cactus-example-electricity-trade/docker-compose.debug.yml @@ -3,7 +3,7 @@ version: "3.4" # Use: docker-compose -f docker-compose.yml -f docker-compose.debug.yml up services: - electricity-trade-blp: + cactus-example-electricity-trade-blp: ports: - "9034:9034" command: node --inspect=0.0.0.0:9034 ./dist/www.js diff --git a/examples/electricity-trade/docker-compose.yml b/examples/cactus-example-electricity-trade/docker-compose.yml similarity index 76% rename from examples/electricity-trade/docker-compose.yml rename to examples/cactus-example-electricity-trade/docker-compose.yml index 4ccad835d8..b257bfac69 100644 --- a/examples/electricity-trade/docker-compose.yml +++ b/examples/cactus-example-electricity-trade/docker-compose.yml @@ -5,7 +5,7 @@ version: "3.4" services: ethereum-validator: - container_name: electricity-trade-ethereum-validator + container_name: cactus-example-electricity-trade-ethereum-validator image: cactus-plugin-ledger-connector-go-ethereum-socketio build: context: ../../packages/cactus-plugin-ledger-connector-go-ethereum-socketio/ @@ -13,14 +13,14 @@ services: - "5050:5050" networks: - geth1net - - electricity-trade-net + - cactus-example-electricity-trade-net volumes: - type: bind source: ./etc/cactus target: /etc/cactus sawtooth-validator: - container_name: electricity-trade-sawtooth-validator + container_name: cactus-example-electricity-trade-sawtooth-validator image: cactus-plugin-ledger-connector-sawtooth-socketio build: context: ../../packages/cactus-plugin-ledger-connector-sawtooth-socketio/ @@ -28,7 +28,7 @@ services: - "5140:5140" networks: - sawtooth_net - - electricity-trade-net + - cactus-example-electricity-trade-net volumes: - type: bind source: ./etc/cactus @@ -42,15 +42,15 @@ services: context: ../../packages/cactus-cmd-socketio-server/ command: ["echo", "OK - Exit"] - electricity-trade-blp: - container_name: electricity-trade-blp + cactus-example-electricity-trade-blp: + container_name: cactus-example-electricity-trade-blp image: cactus-example-electricity-trade-blp build: context: . ports: - "5034:5034" networks: - - electricity-trade-net + - cactus-example-electricity-trade-net depends_on: - ethereum-validator - sawtooth-validator @@ -65,5 +65,5 @@ networks: external: true geth1net: external: true - electricity-trade-net: - driver: bridge \ No newline at end of file + cactus-example-electricity-trade-net: + driver: bridge diff --git a/examples/electricity-trade/electricity-trade.ts b/examples/cactus-example-electricity-trade/electricity-trade.ts similarity index 100% rename from examples/electricity-trade/electricity-trade.ts rename to examples/cactus-example-electricity-trade/electricity-trade.ts diff --git a/examples/electricity-trade/images/electricity-trade-image.png b/examples/cactus-example-electricity-trade/images/electricity-trade-image.png similarity index 100% rename from examples/electricity-trade/images/electricity-trade-image.png rename to examples/cactus-example-electricity-trade/images/electricity-trade-image.png diff --git a/examples/electricity-trade/images/electricity-trade-image.pptx b/examples/cactus-example-electricity-trade/images/electricity-trade-image.pptx similarity index 100% rename from examples/electricity-trade/images/electricity-trade-image.pptx rename to examples/cactus-example-electricity-trade/images/electricity-trade-image.pptx diff --git a/examples/electricity-trade/package.json b/examples/cactus-example-electricity-trade/package.json similarity index 77% rename from examples/electricity-trade/package.json rename to examples/cactus-example-electricity-trade/package.json index ca0ab098ca..c06ffb50c1 100644 --- a/examples/electricity-trade/package.json +++ b/examples/cactus-example-electricity-trade/package.json @@ -1,11 +1,16 @@ { - "name": "electricity-trade", + "name": "@hyperledger/cactus-example-electricity-trade", + "version": "1.0.0", + "license": "Apache-2.0", + "main": "dist/www.js", + "module": "dist/www.js", + "types": "dist/www.d.ts", "private": true, "scripts": { "start": "docker-compose build && docker-compose up", - "build": "npm run build-ts && npm run prepare-docker-build", - "build-ts": "tsc -p ./tsconfig.json", - "prepare-docker-build": "npm run copy-yarn-lock && npm run copy-validator-keys", + "build": "npm run build-ts && npm run build:dev:backend:postbuild", + "build-ts": "tsc", + "build:dev:backend:postbuild": "npm run copy-yarn-lock && npm run copy-validator-keys", "copy-yarn-lock": "cp -f ../../yarn.lock ./dist/", "copy-validator-keys": "npm run copy-ethereum-key && npm run copy-sawtooth-key", "copy-ethereum-key": "cp -fr ../../packages/cactus-plugin-ledger-connector-go-ethereum-socketio/sample-config/CA/connector.crt ./dist/ethereum-connector.crt", @@ -40,8 +45,6 @@ "eslint": "7.32.0", "eslint-config-prettier": "8.4.0", "eslint-plugin-prettier": "4.0.0", - "prettier": "2.5.1", - "tslint": "6.0.0", - "typescript": "4.3.5" + "prettier": "2.5.1" } } diff --git a/examples/electricity-trade/script-cleanup.sh b/examples/cactus-example-electricity-trade/script-cleanup.sh similarity index 82% rename from examples/electricity-trade/script-cleanup.sh rename to examples/cactus-example-electricity-trade/script-cleanup.sh index 477bd63d7f..9804add501 100755 --- a/examples/electricity-trade/script-cleanup.sh +++ b/examples/cactus-example-electricity-trade/script-cleanup.sh @@ -14,9 +14,9 @@ docker rm -f sawtooth-shell-default \ sawtooth-devmode-engine-rust-default \ sawtooth-validator-default \ geth1 \ - electricity-trade-blp \ - electricity-trade-ethereum-validator \ - electricity-trade-sawtooth-validator \ + cactus-example-electricity-trade-blp \ + cactus-example-electricity-trade-ethereum-validator \ + cactus-example-electricity-trade-sawtooth-validator \ cmd-socketio-base-dummy echo ">> Remove docker networks" diff --git a/examples/electricity-trade/script-gen-electricity-usage.sh b/examples/cactus-example-electricity-trade/script-gen-electricity-usage.sh similarity index 100% rename from examples/electricity-trade/script-gen-electricity-usage.sh rename to examples/cactus-example-electricity-trade/script-gen-electricity-usage.sh diff --git a/examples/electricity-trade/script-get-app.sh b/examples/cactus-example-electricity-trade/script-get-app.sh similarity index 100% rename from examples/electricity-trade/script-get-app.sh rename to examples/cactus-example-electricity-trade/script-get-app.sh diff --git a/examples/electricity-trade/script-post-setup-request.sh b/examples/cactus-example-electricity-trade/script-post-setup-request.sh similarity index 100% rename from examples/electricity-trade/script-post-setup-request.sh rename to examples/cactus-example-electricity-trade/script-post-setup-request.sh diff --git a/examples/electricity-trade/script-post-start-request.sh b/examples/cactus-example-electricity-trade/script-post-start-request.sh similarity index 100% rename from examples/electricity-trade/script-post-start-request.sh rename to examples/cactus-example-electricity-trade/script-post-start-request.sh diff --git a/examples/electricity-trade/script-start-ledgers.sh b/examples/cactus-example-electricity-trade/script-start-ledgers.sh similarity index 100% rename from examples/electricity-trade/script-start-ledgers.sh rename to examples/cactus-example-electricity-trade/script-start-ledgers.sh diff --git a/examples/electricity-trade/tools/create_batch/create_batch3.py b/examples/cactus-example-electricity-trade/tools/create_batch/create_batch3.py similarity index 100% rename from examples/electricity-trade/tools/create_batch/create_batch3.py rename to examples/cactus-example-electricity-trade/tools/create_batch/create_batch3.py diff --git a/examples/electricity-trade/tools/periodicExecuter/package.json b/examples/cactus-example-electricity-trade/tools/periodicExecuter/package.json similarity index 100% rename from examples/electricity-trade/tools/periodicExecuter/package.json rename to examples/cactus-example-electricity-trade/tools/periodicExecuter/package.json diff --git a/examples/electricity-trade/tools/periodicExecuter/periodicExecuter.ts b/examples/cactus-example-electricity-trade/tools/periodicExecuter/periodicExecuter.ts similarity index 100% rename from examples/electricity-trade/tools/periodicExecuter/periodicExecuter.ts rename to examples/cactus-example-electricity-trade/tools/periodicExecuter/periodicExecuter.ts diff --git a/examples/electricity-trade/tools/periodicExecuter/tsconfig.json b/examples/cactus-example-electricity-trade/tools/periodicExecuter/tsconfig.json similarity index 100% rename from examples/electricity-trade/tools/periodicExecuter/tsconfig.json rename to examples/cactus-example-electricity-trade/tools/periodicExecuter/tsconfig.json diff --git a/examples/electricity-trade/tools/transferNumericAsset/config/default.js b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/config/default.js similarity index 100% rename from examples/electricity-trade/tools/transferNumericAsset/config/default.js rename to examples/cactus-example-electricity-trade/tools/transferNumericAsset/config/default.js diff --git a/examples/electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts similarity index 100% rename from examples/electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts rename to examples/cactus-example-electricity-trade/tools/transferNumericAsset/copyStaticAssets.ts diff --git a/examples/electricity-trade/tools/transferNumericAsset/package.json b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/package.json similarity index 100% rename from examples/electricity-trade/tools/transferNumericAsset/package.json rename to examples/cactus-example-electricity-trade/tools/transferNumericAsset/package.json diff --git a/examples/electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts similarity index 100% rename from examples/electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts rename to examples/cactus-example-electricity-trade/tools/transferNumericAsset/transferNumericAsset.ts diff --git a/examples/electricity-trade/tools/transferNumericAsset/tsconfig.json b/examples/cactus-example-electricity-trade/tools/transferNumericAsset/tsconfig.json similarity index 100% rename from examples/electricity-trade/tools/transferNumericAsset/tsconfig.json rename to examples/cactus-example-electricity-trade/tools/transferNumericAsset/tsconfig.json diff --git a/examples/cactus-example-electricity-trade/tsconfig.json b/examples/cactus-example-electricity-trade/tsconfig.json new file mode 100644 index 0000000000..bc78419774 --- /dev/null +++ b/examples/cactus-example-electricity-trade/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "outDir": "./dist/", + "tsBuildInfoFile": "../../.build-cache/cactus-example-electricity-trade.tsbuildinfo", + "strict": false // TODO - true, fix warnings + }, + "include": [ + "./*.ts", + ], + "references": [ + { + "path": "../../packages/cactus-cmd-socketio-server/tsconfig.json" + }, + { + "path": "../../packages/cactus-verifier-client/tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/examples/discounted-cartrade/tslint.json b/examples/cactus-example-electricity-trade/tslint.json similarity index 100% rename from examples/discounted-cartrade/tslint.json rename to examples/cactus-example-electricity-trade/tslint.json diff --git a/examples/electricity-trade/www.ts b/examples/cactus-example-electricity-trade/www.ts similarity index 100% rename from examples/electricity-trade/www.ts rename to examples/cactus-example-electricity-trade/www.ts diff --git a/examples/discounted-cartrade/AssetManagement.ts b/examples/discounted-cartrade/AssetManagement.ts deleted file mode 100644 index f47793c9fc..0000000000 --- a/examples/discounted-cartrade/AssetManagement.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * AssetManagement.ts - */ - -import { LPInfoHolder } from "@hyperledger/cactus-cmd-socket-server"; -import { ContractInfoHolder } from "@hyperledger/cactus-cmd-socket-server"; -import { ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; -import { - VerifierFactory, - VerifierFactoryConfig, -} from "@hyperledger/cactus-verifier-client"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "AssetManagement"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -export class AssetManagement { - private connectInfo: LPInfoHolder = null; // connection information - private contractInfoholder: ContractInfoHolder = null; // contract information - private readonly verifierFactory: VerifierFactory; - - constructor() { - this.connectInfo = new LPInfoHolder(); - this.contractInfoholder = new ContractInfoHolder(); - this.verifierFactory = new VerifierFactory( - this.connectInfo.ledgerPluginInfo as VerifierFactoryConfig, - config.logLevel, - ); - } - - addAsset(amount: string): Promise { - return new Promise((resolve, reject) => { - // for Neo - const contractInfo: string = - this.contractInfoholder.getContractInfo("AssetContract"); - const contractInfoObj: {} = JSON.parse(contractInfo); - const coinbase = contractInfoObj["_eth"]["coinbase"]; - const address = contractInfoObj["address"]; - const abi = contractInfoObj["abi"]; - const contract = { - address: address, - abi: abi, - }; - const method = { - type: "contract", - command: "addAsset", - function: "sendTransaction", - }; - const template = "default"; - const args = { args: [amount, { from: coinbase }] }; - // const method = "default"; - // const args = {"method": {type: "contract", command: "addAsset", function: "sendTransaction"}, "args": {"args": [amount, {from: coinbase}]}}; - - this.verifierFactory - .getVerifier("84jUisrs") - .sendSyncRequest(contract, method, args) - .then((result) => { - const response = { - status: result.status, - "Transaction hash": result.data, - }; - resolve(response); - }) - .catch((err) => { - logger.error(err); - reject(err); - }); - }); - } - - getAsset(): Promise { - return new Promise((resolve, reject) => { - // for Neo - const contractInfo: string = - this.contractInfoholder.getContractInfo("AssetContract"); - const contractInfoObj: {} = JSON.parse(contractInfo); - const address = contractInfoObj["address"]; - const abi = contractInfoObj["abi"]; - const contract = { - address: address, - abi: abi, - }; - const method = { - type: "contract", - command: "getAsset", - function: "call", - }; - const template = "default"; - const args = { args: [] }; - // const method = "default"; - // const args = {"method": {type: "contract", command: "getAsset", function: "call"}, "args": {"args": []}}; - - this.verifierFactory - .getVerifier("84jUisrs") - .sendSyncRequest(contract, method, args) - .then((result) => { - const response = { - status: result.status, - asset: parseFloat(result.data), - }; - resolve(response); - }) - .catch((err) => { - logger.error(err); - reject(err); - }); - }); - } -} diff --git a/examples/discounted-cartrade/asset.ts b/examples/discounted-cartrade/asset.ts deleted file mode 100644 index 65ecc9d48c..0000000000 --- a/examples/discounted-cartrade/asset.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2020-2021 Hyperledger Cactus Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * asset.ts - */ - -import { Router, NextFunction, Request, Response } from "express"; -import { ConfigUtil } from "@hyperledger/cactus-cmd-socket-server"; -import { RIFError } from "@hyperledger/cactus-cmd-socket-server"; -import { AssetManagement } from "./AssetManagement"; - -const fs = require("fs"); -const path = require("path"); -const config: any = ConfigUtil.getConfig(); -import { getLogger } from "log4js"; -const moduleName = "asset"; -const logger = getLogger(`${moduleName}`); -logger.level = config.logLevel; - -const router: Router = Router(); -const assetManagement: AssetManagement = new AssetManagement(); - -// POST : add asset. -router.post("/", (req: Request, res: Response, next: NextFunction) => { - try { - assetManagement - .addAsset(req.body.amount) - .then((result) => { - logger.debug("result(addAsset) = " + JSON.stringify(result)); - res.status(200).json(result); - }) - .catch((err) => { - logger.error(err); - }); - } catch (err) { - logger.error(`##err name: ${err.constructor.name}`); - - if (err instanceof RIFError) { - logger.debug(`##catch RIFError, ${err.statusCode}, ${err.message}`); - res.status(err.statusCode); - res.send(err.message); - return; - } - - logger.error(`##err in asset: ${err}`); - next(err); - } -}); - -// GET : get asset. -router.get("/", (req: Request, res: Response, next: NextFunction) => { - try { - assetManagement - .getAsset() - .then((result) => { - logger.debug("result(getAsset) = " + JSON.stringify(result)); - res.status(200).json(result); - }) - .catch((err) => { - logger.error(err); - }); - } catch (err) { - logger.error(`##err name: ${err.constructor.name}`); - - if (err instanceof RIFError) { - logger.debug(`##catch RIFError, ${err.statusCode}, ${err.message}`); - res.status(err.statusCode); - res.send(err.message); - return; - } - - logger.error(`##err in asset: ${err}`); - next(err); - } -}); - -export default router; diff --git a/examples/discounted-cartrade/config/contractInfo.yaml b/examples/discounted-cartrade/config/contractInfo.yaml deleted file mode 100644 index b9105ca4b6..0000000000 --- a/examples/discounted-cartrade/config/contractInfo.yaml +++ /dev/null @@ -1,28 +0,0 @@ -contractInfo: - - - contractName: "AssetContract" - transactionHash: "0x8387ee93223da535a2cc0177d6f86df0a9dbf56f14573baf11d94cb9c9269fb1" - address: "0x89d266156b47c69b8a6f3152c0c56b87b5dea427" - abi: - - - constant: false - inputs: - - - name: _addAsset - type: uint256 - name: addAsset - outputs: [] - payable: false - stateMutability: nonpayable - type: function - - - constant: true - inputs: [] - name: getAsset - outputs: - - - name: "" - type: uint256 - payable: false - stateMutability: view - type: function diff --git a/examples/discounted-cartrade/script-build-discounted-cartrade.sh b/examples/discounted-cartrade/script-build-discounted-cartrade.sh deleted file mode 100755 index 0792c1fdbc..0000000000 --- a/examples/discounted-cartrade/script-build-discounted-cartrade.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -## Build a discounted cartrade app -echo "[process] Build a discounted cartrade app" -npm install -rm -fr ./dist/ -npm run build diff --git a/examples/discounted-cartrade/tsconfig.json b/examples/discounted-cartrade/tsconfig.json deleted file mode 100644 index 8c0bd25a67..0000000000 --- a/examples/discounted-cartrade/tsconfig.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "compilerOptions": { - /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ - "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": [ - "es2015", - "es2016", - "es2017", - "dom" - ], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationDir": "dist/types", - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./dist/lib/", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ -// "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "resolveJsonModule": true, /* When true allows the importing of json files in Typescript code */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - "typeRoots": [ - "./node_modules/@types", - "./typings" - ], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "outDir": "./dist" - }, - "include": [ - "./*.ts", - "./config/*.ts" - ], - "exclude": [ - "copyStaticAssets.ts", - "copyBLPConfig.ts", - "replaceBLPConfigPath.ts" - ], - "references": [ - { - "path": "../../packages/cactus-cmd-socketio-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-verifier-client/tsconfig.json" - } - ] -} diff --git a/examples/electricity-trade/script-build-electricity-trade.sh b/examples/electricity-trade/script-build-electricity-trade.sh deleted file mode 100755 index eeceae25c1..0000000000 --- a/examples/electricity-trade/script-build-electricity-trade.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2020-2022 Hyperledger Cactus Contributors -# SPDX-License-Identifier: Apache-2.0 - -## Build an electricity-trade app -echo "[process] Build an electricity-trade app" -npm install -rm -fr ./dist/ -npm run build diff --git a/examples/electricity-trade/tsconfig.json b/examples/electricity-trade/tsconfig.json deleted file mode 100644 index b4830da010..0000000000 --- a/examples/electricity-trade/tsconfig.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "compilerOptions": { - /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ - "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": [ - "es2015", - "es2016", - "es2017", - "dom" - ], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationDir": "dist/types", - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./dist/lib/", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ -// "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "resolveJsonModule": true, /* When true allows the importing of json files in Typescript code */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - "typeRoots": [ - "./node_modules/@types", - "./typings" - ], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - /* Advanced Options */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "outDir": "./dist" - }, - "include": [ - "./*.ts", - "./config/*.ts" - ], - "references": [ - { - "path": "../../packages/cactus-cmd-socketio-server/tsconfig.json" - }, - { - "path": "../../packages/cactus-verifier-client/tsconfig.json" - } - ] -} diff --git a/examples/electricity-trade/tslint.json b/examples/electricity-trade/tslint.json deleted file mode 100644 index 9a00b4aa19..0000000000 --- a/examples/electricity-trade/tslint.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended" - ], - "jsRules": {}, - "rules": { - "variable-name": { - "options": [ - "allow-leading-underscore", - "ban-keywords", - "check-format" - ] - }, - "no-string-literal": false, - "no-var-requires": false, - "object-literal-shorthand": false, - "max-classes-per-file": false, - "no-console": false - }, - "rulesDirectory": [], - "linterOptions": { - "exclude": [ - "packages/cactus-sdk/src/main/typescript/generated/**/*.ts", - "packages/cactus-sdk/src/main/typescript/public-api.ts" - ] - } -} diff --git a/examples/register-indy-data/Dockerfile b/examples/register-indy-data/Dockerfile index b0f5ffd8e3..9874c98268 100644 --- a/examples/register-indy-data/Dockerfile +++ b/examples/register-indy-data/Dockerfile @@ -1,4 +1,4 @@ -# Simple tool for setup and sending requests to discounted-cartrade sample app +# Simple tool for setup and sending requests to cactus-example-discounted-asset-trade sample app # Run as part of docker-compose or remember to use host network FROM indy-sdk-cli @@ -12,7 +12,7 @@ VOLUME [ "/etc/cactus/" ] USER indy WORKDIR /home/indy -COPY --chown=indy:indy './req_discounted_cartrade.py' './src/' +COPY --chown=indy:indy './register-indy-data.py' './src/' RUN cp 'from-indy-sdk/utils.py' './src/' -ENTRYPOINT [ "python3", "-m", "src.req_discounted_cartrade" ] +ENTRYPOINT [ "python3", "-m", "src.register-indy-data" ] diff --git a/examples/register-indy-data/README.md b/examples/register-indy-data/README.md index 688b704ecb..96a2937d28 100644 --- a/examples/register-indy-data/README.md +++ b/examples/register-indy-data/README.md @@ -1,9 +1,9 @@ -# req_discounted_cartrade +# register-indy-data -Simple tool for indy setup and sending requests to `discounted-cartrade` sample app. +Simple tool for indy setup and sending requests to `cactus-example-discounted-asset-trade` sample app. # Build -- Use script to build base container `indy-sdk-cli` and tool container `req_discounted_cartrade` +- Use script to build base container `indy-sdk-cli` and tool container `register-indy-data` ``` ./script-build-docker.sh ``` @@ -11,22 +11,22 @@ Simple tool for indy setup and sending requests to `discounted-cartrade` sample # Usage - First, ensure indy test pool is already running and docker network `indy-testnet_indy_net` was created. -### Send discounted-cartrade request +### Send cactus-example-discounted-asset-trade request ``` -docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" req_discounted_cartrade +docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" register-indy-data ``` -### Recreate the proof and send discounted-cartrade request +### Recreate the proof and send cactus-example-discounted-asset-trade request ``` -docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" req_discounted_cartrade --force +docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" register-indy-data --force ``` ### Generate proof only ``` -docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" req_discounted_cartrade --proof_only +docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" register-indy-data --proof_only ``` ### Recreate the proof only ``` -docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" req_discounted_cartrade --proof_only --force +docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="indy-testnet_indy_net" register-indy-data --proof_only --force ``` diff --git a/examples/register-indy-data/req_discounted_cartrade.py b/examples/register-indy-data/register-indy-data.py similarity index 100% rename from examples/register-indy-data/req_discounted_cartrade.py rename to examples/register-indy-data/register-indy-data.py diff --git a/examples/register-indy-data/script-build-docker.sh b/examples/register-indy-data/script-build-docker.sh index 57db6acfd4..0b2314bb03 100755 --- a/examples/register-indy-data/script-build-docker.sh +++ b/examples/register-indy-data/script-build-docker.sh @@ -6,5 +6,5 @@ pushd ../../tools/docker/indy-sdk-cli/ docker build . -t indy-sdk-cli popd -echo "# Build req_discounted_cartrade tool" -docker build . -t req_discounted_cartrade +echo "# Build register-indy-data tool" +docker build . -t register-indy-data diff --git a/packages-python/cactus_validator_socketio_indy/.gitignore b/packages-python/cactus_validator_socketio_indy/.gitignore new file mode 100644 index 0000000000..aca9962184 --- /dev/null +++ b/packages-python/cactus_validator_socketio_indy/.gitignore @@ -0,0 +1 @@ +CactusValidatorSocketIOIndy.egg-info/ \ No newline at end of file diff --git a/packages-python/cactus_validator_socketio_indy/README.md b/packages-python/cactus_validator_socketio_indy/README.md index a17239ceaa..9492b96bba 100644 --- a/packages-python/cactus_validator_socketio_indy/README.md +++ b/packages-python/cactus_validator_socketio_indy/README.md @@ -19,7 +19,7 @@ ./script-build-docker.sh - docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" req_discounted_cartrade --proof_only + docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" register-indy-data --proof_only ``` 1. Copy indy validator config ``` @@ -68,4 +68,4 @@ ``` ## Manual Test -- Validator used by `discounted-cartrade` sample app. +- Validator used by `cactus-example-discounted-asset-trade` sample app. diff --git a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts index 65e4535810..8d452a7b4e 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/api-server.ts @@ -537,7 +537,7 @@ export class ApiServer { this.httpServerCockpit?.on("request", app); // the address() method returns a string for unix domain sockets and null - // if the server is not listening but we don't car about any of those cases + // if the server is not listening but we don't care about any of those cases // so the casting here should be safe. Famous last words... I know. const addressInfo = this.httpServerCockpit?.address() as AddressInfo; this.log.info(`Cactus Cockpit net.AddressInfo`, addressInfo); diff --git a/packages/cactus-cmd-socketio-server/README.md b/packages/cactus-cmd-socketio-server/README.md index 0861fff884..d2c28a54f7 100644 --- a/packages/cactus-cmd-socketio-server/README.md +++ b/packages/cactus-cmd-socketio-server/README.md @@ -4,6 +4,6 @@ This module is responsible for providing the cactus node server using socket.io ## Usage samples - To confirm the operation of this package, please refer to the following business-logic sample application: - - [electricity-trade](../../examples/electricity-trade) - - [discounted-cartrade](../../examples/discounted-cartrade) + - [cactus-example-electricity-trade](../../examples/cactus-example-electricity-trade) + - [cactus-example-discounted-asset-trade](../../examples/cactus-example-discounted-asset-trade) diff --git a/packages/cactus-cmd-socketio-server/config/contractInfo.yaml b/packages/cactus-cmd-socketio-server/config/contractInfo.yaml index 49915f9f12..0bf7762210 100644 --- a/packages/cactus-cmd-socketio-server/config/contractInfo.yaml +++ b/packages/cactus-cmd-socketio-server/config/contractInfo.yaml @@ -1,3 +1,3 @@ # Smart contract definitions -# Check examples/discounted-cartrade/config for working example +# Check examples/cactus-example-discounted-asset-trade/config for working example contractInfo: [] \ No newline at end of file diff --git a/packages/cactus-cmd-socketio-server/config/default.yaml b/packages/cactus-cmd-socketio-server/config/default.yaml index da32e77a08..8b79c03caf 100644 --- a/packages/cactus-cmd-socketio-server/config/default.yaml +++ b/packages/cactus-cmd-socketio-server/config/default.yaml @@ -1,6 +1,6 @@ # Default cactus-cmd-socketio-server configuration # Do not change this, update the settings in usersetting.yaml -# Check examples/discounted-cartrade/config for working example +# Check examples/cactus-example-discounted-asset-trade/config for working example # List of Bussiness Logic Plugin and it's validators blpRegistry: [] diff --git a/packages/cactus-cmd-socketio-server/config/usersetting.yaml b/packages/cactus-cmd-socketio-server/config/usersetting.yaml index f38e53d0bd..dca2069b96 100644 --- a/packages/cactus-cmd-socketio-server/config/usersetting.yaml +++ b/packages/cactus-cmd-socketio-server/config/usersetting.yaml @@ -1,4 +1,4 @@ # User settings overwrites default settings from default.yaml -# Check examples/discounted-cartrade/config for working example +# Check examples/cactus-example-discounted-asset-trade/config for working example {} \ No newline at end of file diff --git a/packages/cactus-cmd-socketio-server/config/validator-registry-config.yaml b/packages/cactus-cmd-socketio-server/config/validator-registry-config.yaml index 962565b0a0..598fddfc0e 100644 --- a/packages/cactus-cmd-socketio-server/config/validator-registry-config.yaml +++ b/packages/cactus-cmd-socketio-server/config/validator-registry-config.yaml @@ -1,5 +1,5 @@ # Cactus validator configuration -# Check examples/discounted-cartrade/config for working example +# Check examples/cactus-example-discounted-asset-trade/config for working example ledgerPluginInfo: [] signTxInfo: {} \ No newline at end of file diff --git a/packages/cactus-cmd-socketio-server/src/main/typescript/routing-interface/RequestInfo.ts b/packages/cactus-cmd-socketio-server/src/main/typescript/routing-interface/RequestInfo.ts index 5099f88726..2c2fa75027 100644 --- a/packages/cactus-cmd-socketio-server/src/main/typescript/routing-interface/RequestInfo.ts +++ b/packages/cactus-cmd-socketio-server/src/main/typescript/routing-interface/RequestInfo.ts @@ -12,7 +12,7 @@ class TradeInfo { fabricAccountFrom: string = ""; fabricAccountTo: string = ""; tradingValue: string = ""; - carID: string = ""; + assetID: string = ""; proofJson: object = {}; } diff --git a/packages/cactus-plugin-ledger-connector-fabric-socketio/README.md b/packages/cactus-plugin-ledger-connector-fabric-socketio/README.md index e3558f1dce..6ec774cf44 100644 --- a/packages/cactus-plugin-ledger-connector-fabric-socketio/README.md +++ b/packages/cactus-plugin-ledger-connector-fabric-socketio/README.md @@ -66,7 +66,7 @@ npm run start ## Usage samples - To confirm the operation of this package, please refer to the following business-logic sample application: - - [discounted-cartrade](../../examples/discounted-cartrade) + - [cactus-example-discounted-asset-trade](../../examples/cactus-example-discounted-asset-trade) ## Contributing diff --git a/packages/cactus-plugin-ledger-connector-fabric-socketio/sample-config/default.yaml b/packages/cactus-plugin-ledger-connector-fabric-socketio/sample-config/default.yaml index ae2d09261f..c25933094c 100644 --- a/packages/cactus-plugin-ledger-connector-fabric-socketio/sample-config/default.yaml +++ b/packages/cactus-plugin-ledger-connector-fabric-socketio/sample-config/default.yaml @@ -10,17 +10,17 @@ fabric: contractName: "basic" peers: - name: "peer0.org1.example.com" - requests: "grpcs://cartrade_faio2x_testnet:7051" + requests: "grpcs://asset_trade_faio2x_testnet:7051" tlsca: "/etc/cactus/connector-fabric-socketio/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem" orderer: name: "orderer.example.com" - url: "grpcs://cartrade_faio2x_testnet:7050" + url: "grpcs://asset_trade_faio2x_testnet:7050" tlsca: "/etc/cactus/connector-fabric-socketio/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" ca: name: "ca-org1" - url: "https://cartrade_faio2x_testnet:7054" + url: "https://asset_trade_faio2x_testnet:7054" submitter: name: "admin" secret: "adminpw" diff --git a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/README.md b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/README.md index 0d0bbc91b4..683c63d857 100644 --- a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/README.md +++ b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/README.md @@ -65,8 +65,8 @@ npm run start ## Usage samples - To confirm the operation of this package, please refer to the following business-logic sample applications: - - [electricity-trade](../../examples/electricity-trade) - - [discounted-cartrade](../../examples/discounted-cartrade) + - [cactus-example-electricity-trade](../../examples/cactus-example-electricity-trade) + - [cactus-example-discounted-asset-trade](../../examples/cactus-example-discounted-asset-trade) ## Contributing diff --git a/packages/cactus-plugin-ledger-connector-sawtooth-socketio/README.md b/packages/cactus-plugin-ledger-connector-sawtooth-socketio/README.md index 53c298deab..35fce1fceb 100644 --- a/packages/cactus-plugin-ledger-connector-sawtooth-socketio/README.md +++ b/packages/cactus-plugin-ledger-connector-sawtooth-socketio/README.md @@ -63,7 +63,7 @@ npm run start ## Usage samples - To confirm the operation of this package, please refer to the following business-logic sample application: - - [electricity-trade](../../examples/electricity-trade) + - [cactus-example-electricity-trade](../../examples/cactus-example-electricity-trade) ## Contributing diff --git a/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/setup.sh b/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/setup.sh index 2233616b1f..68603feb15 100755 --- a/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/setup.sh +++ b/tools/docker/fabric-all-in-one/asset-transfer-basic-utils/setup.sh @@ -5,7 +5,7 @@ # Exit on error set -e -FABRIC_CONTAINER_NAME=${CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME:-cartrade_faio2x_testnet} +FABRIC_CONTAINER_NAME=${CACTUS_FABRIC_ALL_IN_ONE_CONTAINER_NAME:-asset_trade_faio2x_testnet} if ! [ "$(docker inspect -f '{{.State.Running}}' ${FABRIC_CONTAINER_NAME})" == "true" ] then diff --git a/tools/docker/indy-testnet/README.md b/tools/docker/indy-testnet/README.md index cfd202a1b7..f54ae8b12a 100644 --- a/tools/docker/indy-testnet/README.md +++ b/tools/docker/indy-testnet/README.md @@ -26,7 +26,7 @@ docker-compose down - Follow build instructions described in `register-indy-data` README. - Run container to generate proof only, use force flag to overwrite possible leftovers from previous runs. It will save the proof in `/etc/cactus/validator_socketio_indy/myproof.json` ``` -docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" req_discounted_cartrade --force --proof_only +docker run --rm -ti -v/etc/cactus/:/etc/cactus/ --net="host" register-indy-data --force --proof_only ``` ## Cleanup diff --git a/tsconfig.json b/tsconfig.json index 6d67c83b2a..a046f43c93 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -118,6 +118,12 @@ { "path": "./examples/cactus-example-supply-chain-frontend/tsconfig.json" }, + { + "path": "./examples/cactus-example-electricity-trade/tsconfig.json" + }, + { + "path": "./examples/cactus-example-discounted-asset-trade/tsconfig.json" + }, { "path": "./extensions/cactus-plugin-object-store-ipfs/tsconfig.json" }, diff --git a/whitepaper/whitepaper.md b/whitepaper/whitepaper.md index a1bceec920..b3a2cc4931 100644 --- a/whitepaper/whitepaper.md +++ b/whitepaper/whitepaper.md @@ -45,7 +45,7 @@ Photo by Pontus Wellgraf on Unsplash - [2.5 Blockchain Interoperability Design Patterns](#25-blockchain-interoperability-design-patterns) - [2.6 General Workflow to Build a cross-chain decentralized application](#26-general-workflow-to-build-a-cross-chain-decentralized-application) - [3. Example Use Cases](#3-example-use-cases) - - [3.1 Car Trade](#31-car-trade) + - [3.1 Asset Trade](#31-asset-trade) - [3.2 Electricity Trade](#32-electricity-trade) - [3.3 Supply chain](#33-supply-chain) - [3.4 Ethereum to Quorum Asset Transfer](#34-ethereum-to-quorum-asset-transfer) @@ -152,7 +152,7 @@ Photo by Pontus Wellgraf on Unsplash # 1. Abstract -"Before a technology unlocks its full range of applications, it first undergoes underestimation. Distributed Ledger Technology (DLT), including blockchain, is no exception and is here to stay". +"Before a technology unlocks its full range of applications, it first undergoes underestimation. Distributed Ledger Technology (DLT), including blockchain, is no exception and is here to stay". Hundreds of blockchains exist, supporting diverse use cases: from cryptocurrencies, to digital identity, supply chain, and education certification. The trends towards using blockchain for those are increasing. A recent report from Gartner predicts that by 2023, 35% of enterprise blockchain applications will integrate with decentralized applications and services. Many blockchain ecosystems. Blockchain is slowly but steadily becoming an infrastructure for global value exchange and distributed computation" [[6](#8-references)]. @@ -160,11 +160,11 @@ blockchain applications will integrate with decentralized applications and servi It allows communication between systems to exchange data and digital assets, leading to more diverse and innovative solutions to real-world problems. It allows synergies across ecosystems and leverages network effects, leading to a similar boom that the rise of the Internet has seen. This way, no blockchain should become a single point of failure, and we contribute directly to the decentralization of the technology. -However, most blockchains were not createed with interoperability in mind, being standalone networks. Connecting those efficiently and securely remains an open problem. +However, most blockchains were not createed with interoperability in mind, being standalone networks. Connecting those efficiently and securely remains an open problem. -Hyperledger Cactus is an open-source project connecting distributed ledgers to enterprise systems via a set of plugins. Plugins can be _business logic plugins_, _connector plugins_, _tooling plugins_, or _core packages_. Business logic plugins implement cross-chain use cases (e.g., asset exchange across DLTs). Connector plugins implement blockchain clients, allowing Cactus nodes to connect to blockchains (e.g., Hyperledger Fabric connector). Tooling plugins support the development of business logic plugins (e.g., cryptography plugins, storage plugins). Core packages support the creation of Cactus nodes and their consortia (e.g., cactus-core). +Hyperledger Cactus is an open-source project connecting distributed ledgers to enterprise systems via a set of plugins. Plugins can be _business logic plugins_, _connector plugins_, _tooling plugins_, or _core packages_. Business logic plugins implement cross-chain use cases (e.g., asset exchange across DLTs). Connector plugins implement blockchain clients, allowing Cactus nodes to connect to blockchains (e.g., Hyperledger Fabric connector). Tooling plugins support the development of business logic plugins (e.g., cryptography plugins, storage plugins). Core packages support the creation of Cactus nodes and their consortia (e.g., cactus-core). Cactus is blockchain-agnostic and provides a modular architecture for bespoke cross-chain business logic to be deployed on multiple heterogeneous blockchain infrastructures. Cactus then aims to be the foundation of mature blockchain ecosystems by directly supporting businessses that are inherently multi-system. By integrating blockchains with other systems in a systematic and unified approach, Cactus minimizes security risks. @@ -207,7 +207,7 @@ Unicity applies to FAs and NFAs meaning it guarantees that only one valid repres There are three methods for a dApp or mdApp to connect to a DLT. These mechanisms are called the connection modes. Those are: -1. DLT Nodes: DLT nodes are the software systems that run a DLT protocol. +1. DLT Nodes: DLT nodes are the software systems that run a DLT protocol. 2. DLT Proxy: "a DLT node proxy manages the routing and load balancing issues between an application and one or more DLT nodes, creating logical separation. To an application, @@ -310,9 +310,9 @@ Burning of assets can be implemented as follows: 2. Tokens/Coins are subtracted from the user account as well as optionally from the total token/coin supply value. -## 2.6 General Workflow to Build a cross-chain decentralized application -Cactus streamlines the development of cross-chain decentralized application, also known as multiple DLT apps (mDapps) by having three major pilars: 1) robust testing infrastructure (tooling plugins), 2) a modular architecture -enabling to combine plugins according to each use case necessity into a set of API servers encapsulated by a Cactus node. Cactus nodes can integrate innovative core plugins that combine them in different ways. Finally 3), business logic plugins that implement the core logic of a business utilizing infrastructure that Cactus provides access. +## 2.6 General Workflow to Build a cross-chain decentralized application +Cactus streamlines the development of cross-chain decentralized application, also known as multiple DLT apps (mDapps) by having three major pilars: 1) robust testing infrastructure (tooling plugins), 2) a modular architecture +enabling to combine plugins according to each use case necessity into a set of API servers encapsulated by a Cactus node. Cactus nodes can integrate innovative core plugins that combine them in different ways. Finally 3), business logic plugins that implement the core logic of a business utilizing infrastructure that Cactus provides access. In more technical terms, a `ConfigService`object is initialized for each Cactus node (describing, for example, the private keys for that Cactus node, public keys of the members of the consortium, protocols supported). Then, multiple plugins that expose a REST API can be installed on the node. Those plugins are accessible to the node via the plugin registry: an abstraction that allows one to easily manage and configure installed plugins, including business logic plugins. @@ -380,11 +380,11 @@ The following table summarizes the use cases that will be explained in more deta -## 3.1 Car Trade +## 3.1 Asset Trade | Use Case Attribute Name | Use Case Attribute Value | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Use Case Title | Car Trade | +| Use Case Title | Asset Trade | | Use Case | TBD | | Interworking patterns | TBD | | Type of Social Interaction | TBD | @@ -1720,7 +1720,7 @@ The blockchain migrator feature paves the way for building a solution that perfo 5: Rafael Belchior, André Vasconcelos, Sérgio Guerreiro, and Miguel Correia. 2021. A Survey on Blockchain Interoperability: Past, Present, and Future Trends. ACM Comput. Surv. 54, 8, Article 168 (November 2022), 41 pages. DOI:https://doi.org/10.1145/3471140 -6: Belchior, Rafael; Riley, Luke; Hardjono, Thomas; Vasconcelos, André; Correia, Miguel (2022): Do You Need a Distributed Ledger Technology Interoperability Solution?. TechRxiv. Preprint. https://doi.org/10.36227/techrxiv.18786527.v1 +6: Belchior, Rafael; Riley, Luke; Hardjono, Thomas; Vasconcelos, André; Correia, Miguel (2022): Do You Need a Distributed Ledger Technology Interoperability Solution?. TechRxiv. Preprint. https://doi.org/10.36227/techrxiv.18786527.v1 7: Rafael Belchior, André Vasconcelos, Miguel Correia, Thomas Hardjono, Hermes: Fault-tolerant middleware for blockchain interoperability, Future Generation Computer Systems, diff --git a/yarn.lock b/yarn.lock index ca56d17a46..23372fc998 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2617,6 +2617,14 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.4" +"@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.3": + version "2.6.4" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.4.tgz#1b3cdd3aa4ee3b0ca366756fc35e4a03022a01cc" + integrity sha512-RDJh/R/EAr+B7ZRg5LfJ0BIpf/1LydFgYdvZEuTraojCbVypO2sQ+QnpP5u2wJf9DASyooKqu8O4FJEWUV6NXw== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.4" + "@ethereumjs/ethash@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.1.0.tgz#7c5918ffcaa9cb9c1dc7d12f77ef038c11fb83fb" @@ -2636,6 +2644,14 @@ "@ethereumjs/common" "^2.6.1" ethereumjs-util "^7.1.4" +"@ethereumjs/tx@^3.3.2": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.1.tgz#8d941b83a602b4a89949c879615f7ea9a90e6671" + integrity sha512-xzDrTiu4sqZXUcaBxJ4n4W5FrppwxLxZB4ZDGVLtxSQR4lVuOnFR6RcUHdg1mpUhAPVrmnzLJpxaeXnPxIyhWA== + dependencies: + "@ethereumjs/common" "^2.6.3" + ethereumjs-util "^7.1.4" + "@ethereumjs/vm@^5.5.2": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.7.1.tgz#3bf757fbad0081838ccb4f22003cd73319ab3616" @@ -5147,6 +5163,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.32.tgz#2ca61c9ef8c77f6fa1733be9e623ceb0d372ad96" integrity sha512-JcII3D5/OapPGx+eJ+Ik1SQGyt6WvuqdRfh9jUwL6/iHGjmyOriBDciBUu7lEIBTL2ijxwrR70WUnw5AEDmFvQ== +"@types/node@14.18.12", "@types/node@^14.6.2": + version "14.18.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24" + integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A== + "@types/node@15.14.7": version "15.14.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.7.tgz#29fea9a5b14e2b75c19028e1c7a32edd1e89fe92" @@ -5162,11 +5183,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.46.tgz#7e49dee4c54fd19584e6a9e0da5f3dc2e9136bc7" integrity sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A== -"@types/node@^14.6.2": - version "14.18.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24" - integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -5509,6 +5525,20 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" + integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== + dependencies: + "@typescript-eslint/experimental-utils" "4.33.0" + "@typescript-eslint/scope-manager" "4.33.0" + debug "^4.3.1" + functional-red-black-tree "^1.0.1" + ignore "^5.1.8" + regexpp "^3.1.0" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/experimental-utils@4.29.1": version "4.29.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.1.tgz#0af2b17b0296b60c6b207f11062119fa9c5a8994" @@ -5521,6 +5551,18 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" +"@typescript-eslint/experimental-utils@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" + integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== + dependencies: + "@types/json-schema" "^7.0.7" + "@typescript-eslint/scope-manager" "4.33.0" + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/typescript-estree" "4.33.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + "@typescript-eslint/parser@4.29.1": version "4.29.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.1.tgz#17dfbb45c9032ffa0fe15881d20fbc2a4bdeb02d" @@ -5531,6 +5573,16 @@ "@typescript-eslint/typescript-estree" "4.29.1" debug "^4.3.1" +"@typescript-eslint/parser@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" + integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== + dependencies: + "@typescript-eslint/scope-manager" "4.33.0" + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/typescript-estree" "4.33.0" + debug "^4.3.1" + "@typescript-eslint/scope-manager@4.29.1": version "4.29.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.1.tgz#f25da25bc6512812efa2ce5ebd36619d68e61358" @@ -5539,11 +5591,24 @@ "@typescript-eslint/types" "4.29.1" "@typescript-eslint/visitor-keys" "4.29.1" +"@typescript-eslint/scope-manager@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" + integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== + dependencies: + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/visitor-keys" "4.33.0" + "@typescript-eslint/types@4.29.1": version "4.29.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5" integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA== +"@typescript-eslint/types@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" + integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== + "@typescript-eslint/typescript-estree@4.29.1": version "4.29.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f" @@ -5557,6 +5622,19 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" + integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== + dependencies: + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/visitor-keys" "4.33.0" + debug "^4.3.1" + globby "^11.0.3" + is-glob "^4.0.1" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/visitor-keys@4.29.1": version "4.29.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d" @@ -5565,6 +5643,14 @@ "@typescript-eslint/types" "4.29.1" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" + integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== + dependencies: + "@typescript-eslint/types" "4.33.0" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -6969,7 +7055,7 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -basic-auth@~2.0.1: +basic-auth@~2.0.0, basic-auth@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== @@ -7022,7 +7108,7 @@ bind-obj-methods@^3.0.0: resolved "https://registry.yarnpkg.com/bind-obj-methods/-/bind-obj-methods-3.0.0.tgz#65b66544d9d668d80dfefe2089dd347ad1dbcaed" integrity sha512-nLEaaz3/sEzNSyPWRsN9HNsqwk1AUyECtGj+XwGdIi3xABnEqecvXtIJ0wehQXuuER5uZ/5fTs2usONgYjG+iw== -bindings@^1.2.1, bindings@^1.5.0: +bindings@^1.2.1, bindings@^1.3.1, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -8303,7 +8389,7 @@ colorette@1.1.0: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.1.0.tgz#1f943e5a357fac10b4e0f5aaef3b14cdc1af6ec7" integrity sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg== -colorette@2.0.16, colorette@^2.0.16: +colorette@2.0.16, colorette@^2.0.10, colorette@^2.0.16: version "2.0.16" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== @@ -8313,11 +8399,6 @@ colorette@^1.2.1, colorette@^1.2.2: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== -colorette@^2.0.10, colorette@^2.0.16: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== - colors@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -9586,7 +9667,7 @@ debug@4.3.2: dependencies: ms "2.1.2" -debug@4.3.4: +debug@4.3.4, debug@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -9600,13 +9681,6 @@ debug@^3.0.0, debug@^3.0.1, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6, debug@^3.2 dependencies: ms "^2.1.1" -debug@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -10998,6 +11072,11 @@ eslint-config-prettier@8.3.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== +eslint-config-prettier@8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz#8e6d17c7436649e98c4c2189868562921ef563de" + integrity sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw== + eslint-config-standard@16.0.3: version "16.0.3" resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516" @@ -11067,6 +11146,13 @@ eslint-plugin-prettier@3.4.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-prettier@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0" + integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ== + dependencies: + prettier-linter-helpers "^1.0.0" + eslint-plugin-promise@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-5.1.0.tgz#fb2188fb734e4557993733b41aa1a688f46c6f24" @@ -12468,7 +12554,7 @@ gauge@^3.0.0: strip-ansi "^6.0.1" wide-align "^1.1.2" -gauge@^4.0.0: +gauge@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== @@ -13794,6 +13880,15 @@ indexof@0.0.1: resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= +indy-sdk@1.16.0-dev-1649: + version "1.16.0-dev-1649" + resolved "https://registry.yarnpkg.com/indy-sdk/-/indy-sdk-1.16.0-dev-1649.tgz#e2c781d11356b60c4497b0ac515435ed9a5be4be" + integrity sha512-bbByZ/JUqR5LBi9yoiExXjmBEQqrNsb6hm0ts2lcVshBdN6DPYayVgmwjS7E7jMbBG5wFy/zk04HZVuVCYPlMw== + dependencies: + bindings "^1.3.1" + nan "^2.11.1" + node-gyp "^8.0.0" + infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -16695,6 +16790,17 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" +log4js@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.4.0.tgz#3f63ccfc8033c83cd617a4d2d50e48be5944eae9" + integrity sha512-ysc/XUecZJuN8NoKOssk3V0cQ29xY4fra6fnigZa5VwxFsCsvdqsdnEuAxNN89LlHpbE4KUD3zGcn+kFqonSVQ== + dependencies: + date-format "^4.0.3" + debug "^4.3.3" + flatted "^3.2.4" + rfdc "^1.3.0" + streamroller "^3.0.2" + log4js@6.4.1, log4js@^6.4.1: version "6.4.1" resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.4.1.tgz#9d3a8bf2c31c1e213fe3fc398a6053f7a2bc53e8" @@ -17507,6 +17613,17 @@ morgan@1.10.0: on-finished "~2.3.0" on-headers "~1.0.2" +morgan@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59" + integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA== + dependencies: + basic-auth "~2.0.0" + debug "2.6.9" + depd "~1.1.2" + on-finished "~2.3.0" + on-headers "~1.0.1" + mrmime@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.0.tgz#14d387f0585a5233d291baba339b063752a2398b" @@ -17670,7 +17787,7 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.14.1, nan@^2.15.0, nan@^2.2.1: +nan@^2.11.1, nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.14.1, nan@^2.15.0, nan@^2.2.1: version "2.15.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== @@ -17788,6 +17905,11 @@ needle@^2.2.1, needle@^2.5.2: iconv-lite "^0.4.4" sax "^1.2.4" +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + negotiator@0.6.3, negotiator@^0.6.2, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -17938,7 +18060,7 @@ node-gyp@^7.1.0: tar "^6.0.2" which "^2.0.2" -node-gyp@^8.2.0: +node-gyp@^8.0.0, node-gyp@^8.2.0: version "8.4.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== @@ -18322,13 +18444,13 @@ npmlog@^5.0.1: set-blocking "^2.0.0" npmlog@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.1.tgz#06f1344a174c06e8de9c6c70834cfba2964bba17" - integrity sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg== + version "6.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" + integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== dependencies: are-we-there-yet "^3.0.0" console-control-strings "^1.1.0" - gauge "^4.0.0" + gauge "^4.0.3" set-blocking "^2.0.0" nth-check@^2.0.1: @@ -18531,7 +18653,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -on-headers@~1.0.2: +on-headers@~1.0.1, on-headers@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== @@ -20153,7 +20275,7 @@ postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0. picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.14: +postcss@^8.2.14, postcss@^8.3.11: version "8.4.12" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== @@ -20171,15 +20293,6 @@ postcss@^8.2.15, postcss@^8.3.5, postcss@^8.3.7: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@^8.3.11: - version "8.4.12" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" - integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== - dependencies: - nanoid "^3.3.1" - picocolors "^1.0.0" - source-map-js "^1.0.2" - prebuild-install@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.0.1.tgz#c10075727c318efe72412f333e0ef625beaf3870" @@ -20236,6 +20349,11 @@ prettier@2.1.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== +prettier@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" + integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== + pretty-bytes@^5.3.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -24641,6 +24759,15 @@ web3-bzz@1.6.0: got "9.6.0" swarm-js "^0.1.40" +web3-bzz@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.7.0.tgz#0b754d787a1700f0580fa741fc707d19d1447ff4" + integrity sha512-XPhTWUnZa8gnARfiqaag3jJ9+6+a66Li8OikgBUJoMUqPuQTCJPncTbGYqOJIfRFGavEAdlMnfYXx9lvgv2ZPw== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + web3-core-helpers@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.5.2.tgz#b6bd5071ca099ba3f92dfafb552eed2b70af2795" @@ -24657,6 +24784,14 @@ web3-core-helpers@1.6.0: web3-eth-iban "1.6.0" web3-utils "1.6.0" +web3-core-helpers@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.7.0.tgz#0eaef7bc55ff7ec5ba726181d0e8529be5d60903" + integrity sha512-kFiqsZFHJliKF8VKZNjt2JvKu3gu7h3N1/ke3EPhdp9Li/rLmiyzFVr6ApryZ1FSjbSx6vyOkibG3m6xQ5EHJA== + dependencies: + web3-eth-iban "1.7.0" + web3-utils "1.7.0" + web3-core-method@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.2.tgz#d1d602657be1000a29d11e3ca3bf7bc778dea9a5" @@ -24681,6 +24816,17 @@ web3-core-method@1.6.0: web3-core-subscriptions "1.6.0" web3-utils "1.6.0" +web3-core-method@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.7.0.tgz#5e98030ac9e0d96c6ff1ba93fde1292a332b1b81" + integrity sha512-43Om+kZX8wU5u1pJ28TltF9e9pSTRph6b8wrOb6wgXAfPHqMulq6UTBJWjXXIRVN46Eiqv0nflw35hp9bbgnbA== + dependencies: + "@ethersproject/transactions" "^5.0.0-beta.135" + web3-core-helpers "1.7.0" + web3-core-promievent "1.7.0" + web3-core-subscriptions "1.7.0" + web3-utils "1.7.0" + web3-core-promievent@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.2.tgz#2dc9fe0e5bbeb7c360fc1aac5f12b32d9949a59b" @@ -24695,6 +24841,13 @@ web3-core-promievent@1.6.0: dependencies: eventemitter3 "4.0.4" +web3-core-promievent@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.7.0.tgz#e2c6c38f29b912cc549a2a3f806636a3393983eb" + integrity sha512-xPH66XeC0K0k29GoRd0vyPQ07yxERPRd4yVPrbMzGAz/e9E4M3XN//XK6+PdfGvGw3fx8VojS+tNIMiw+PujbQ== + dependencies: + eventemitter3 "4.0.4" + web3-core-requestmanager@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.2.tgz#43ccc00779394c941b28e6e07e217350fd1ded71" @@ -24717,6 +24870,17 @@ web3-core-requestmanager@1.6.0: web3-providers-ipc "1.6.0" web3-providers-ws "1.6.0" +web3-core-requestmanager@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.7.0.tgz#5b62b413471d6d2a789ee33d587d280178979c7e" + integrity sha512-rA3dBTBPrt+eIfTAQ2/oYNTN/2wbZaYNR3pFZGqG8+2oCK03+7oQyz4sWISKy/nYQhURh4GK01rs9sN4o/Tq9w== + dependencies: + util "^0.12.0" + web3-core-helpers "1.7.0" + web3-providers-http "1.7.0" + web3-providers-ipc "1.7.0" + web3-providers-ws "1.7.0" + web3-core-subscriptions@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz#8eaebde44f81fc13c45b555c4422fe79393da9cf" @@ -24733,6 +24897,14 @@ web3-core-subscriptions@1.6.0: eventemitter3 "4.0.4" web3-core-helpers "1.6.0" +web3-core-subscriptions@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.7.0.tgz#30475d8ed5f51a170e5df02085f721925622a795" + integrity sha512-6giF8pyJrPmWrRpc2WLoVCvQdMMADp20ZpAusEW72axauZCNlW1XfTjs0i4QHQBfdd2lFp65qad9IuATPhuzrQ== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.7.0" + web3-core@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.2.tgz#ca2b9b1ed3cf84d48b31c9bb91f7628f97cfdcd5" @@ -24759,6 +24931,19 @@ web3-core@1.6.0: web3-core-requestmanager "1.6.0" web3-utils "1.6.0" +web3-core@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.7.0.tgz#67b7839130abd19476e7f614ea6ec4c64d08eb00" + integrity sha512-U/CRL53h3T5KHl8L3njzCBT7fCaHkbE6BGJe3McazvFldRbfTDEHXkUJCyM30ZD0RoLi3aDfTVeFIusmEyCctA== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-core-requestmanager "1.7.0" + web3-utils "1.7.0" + web3-eth-abi@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.2.tgz#b627eada967f39ae4657ddd61b693cb00d55cb29" @@ -24775,6 +24960,14 @@ web3-eth-abi@1.6.0: "@ethersproject/abi" "5.0.7" web3-utils "1.6.0" +web3-eth-abi@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.7.0.tgz#4fac9c7d9e5a62b57f8884b37371f515c766f3f4" + integrity sha512-heqR0bWxgCJwjWIhq2sGyNj9bwun5+Xox/LdZKe+WMyTSy0cXDXEAgv3XKNkXC4JqdDt/ZlbTEx4TWak4TRMSg== + dependencies: + "@ethersproject/abi" "5.0.7" + web3-utils "1.7.0" + web3-eth-accounts@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.2.tgz#cf506c21037fa497fe42f1f055980ce4acf83731" @@ -24809,6 +25002,23 @@ web3-eth-accounts@1.6.0: web3-core-method "1.6.0" web3-utils "1.6.0" +web3-eth-accounts@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.7.0.tgz#d0a6f2cfbd61dd6014224056070b7f8d1d63c0ab" + integrity sha512-Zwm7TlQXdXGRuS6+ib1YsR5fQwpfnFyL6UAZg1zERdrUrs3IkCZSL3yCP/8ZYbAjdTEwWljoott2iSqXNH09ug== + dependencies: + "@ethereumjs/common" "^2.5.0" + "@ethereumjs/tx" "^3.3.2" + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-util "^7.0.10" + scrypt-js "^3.0.1" + uuid "3.3.2" + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-utils "1.7.0" + web3-eth-contract@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.2.tgz#ffbd799fd01e36596aaadefba323e24a98a23c2f" @@ -24837,6 +25047,20 @@ web3-eth-contract@1.6.0: web3-eth-abi "1.6.0" web3-utils "1.6.0" +web3-eth-contract@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.7.0.tgz#3795767a65d7b87bd22baea3e18aafdd928d5313" + integrity sha512-2LY1Xwxu5rx468nqHuhvupQAIpytxIUj3mGL9uexszkhrQf05THVe3i4OnUCzkeN6B2cDztNOqLT3j9SSnVQDg== + dependencies: + "@types/bn.js" "^4.11.5" + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-core-promievent "1.7.0" + web3-core-subscriptions "1.7.0" + web3-eth-abi "1.7.0" + web3-utils "1.7.0" + web3-eth-ens@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.2.tgz#ecb3708f0e8e2e847e9d89e8428da12c30bba6a4" @@ -24865,6 +25089,20 @@ web3-eth-ens@1.6.0: web3-eth-contract "1.6.0" web3-utils "1.6.0" +web3-eth-ens@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.7.0.tgz#49c5300935b026578aaaf9664e5e5529d4c76a68" + integrity sha512-I1bikYJJWQ/FJZIAvwsGOvzAgcRIkosWG4s1L6veRoXaU8OEJFeh4s00KcfHDxg7GWZZGbUSbdbzKpwRbWnvkg== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-promievent "1.7.0" + web3-eth-abi "1.7.0" + web3-eth-contract "1.7.0" + web3-utils "1.7.0" + web3-eth-iban@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.2.tgz#f390ad244ef8a6c94de7c58736b0b80a484abc8e" @@ -24881,6 +25119,14 @@ web3-eth-iban@1.6.0: bn.js "^4.11.9" web3-utils "1.6.0" +web3-eth-iban@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.7.0.tgz#b56cd58587457d3339730e0cb42772a37141b434" + integrity sha512-1PFE/Og+sPZaug+M9TqVUtjOtq0HecE+SjDcsOOysXSzslNC2CItBGkcRwbvUcS+LbIkA7MFsuqYxOL0IV/gyA== + dependencies: + bn.js "^4.11.9" + web3-utils "1.7.0" + web3-eth-personal@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.2.tgz#043335a19ab59e119ba61e3bd6c3b8cde8120490" @@ -24905,6 +25151,18 @@ web3-eth-personal@1.6.0: web3-net "1.6.0" web3-utils "1.6.0" +web3-eth-personal@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.7.0.tgz#260c9b6af6e0bea772c6a9a5d58c8d62c035ed99" + integrity sha512-Dr9RZTNOR80PhrPKGdktDUXpOgExEcCcosBj080lKCJFU1paSPj9Zfnth3u6BtIOXyKsVFTrpqekqUDyAwXnNw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-net "1.7.0" + web3-utils "1.7.0" + web3-eth@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.2.tgz#0f6470df60a2a7d04df4423ca7721db8ed5ad72b" @@ -24941,6 +25199,24 @@ web3-eth@1.6.0: web3-net "1.6.0" web3-utils "1.6.0" +web3-eth@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.7.0.tgz#4adbed9b28ab7f81cb11e3586a12d01ab6e812aa" + integrity sha512-3uYwjMjn/MZjKIzXCt4YL9ja/k9X5shfa4lKparZhZE6uesmu+xmSmrEFXA/e9qcveF50jkV7frjkT8H+cLYtw== + dependencies: + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-core-subscriptions "1.7.0" + web3-eth-abi "1.7.0" + web3-eth-accounts "1.7.0" + web3-eth-contract "1.7.0" + web3-eth-ens "1.7.0" + web3-eth-iban "1.7.0" + web3-eth-personal "1.7.0" + web3-net "1.7.0" + web3-utils "1.7.0" + web3-net@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.2.tgz#58915d7e2dad025d2a08f02c865f3abe61c48eff" @@ -24959,6 +25235,15 @@ web3-net@1.6.0: web3-core-method "1.6.0" web3-utils "1.6.0" +web3-net@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.7.0.tgz#694a0c7988f7efc336bab0ee413eb4522efee3b2" + integrity sha512-8pmfU1Se7DmG40Pu8nOCKlhuI12VsVzCtdFDnLAai0zGVAOUuuOCK71B2aKm6u9amWBJjtOlyrCwvsG+QEd6dw== + dependencies: + web3-core "1.7.0" + web3-core-method "1.7.0" + web3-utils "1.7.0" + web3-providers-http@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.5.2.tgz#94f95fe5572ca54aa2c2ffd42c63956436c9eb0a" @@ -24975,6 +25260,14 @@ web3-providers-http@1.6.0: web3-core-helpers "1.6.0" xhr2-cookies "1.1.0" +web3-providers-http@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.7.0.tgz#0661261eace122a0ed5853f8be5379d575a9130c" + integrity sha512-Y9reeEiApfvQKLUUtrU4Z0c+H6b7BMWcsxjgoXndI1C5NB297mIUfltXxfXsh5C/jk5qn4Q3sJp3SwQTyVjH7Q== + dependencies: + web3-core-helpers "1.7.0" + xhr2-cookies "1.1.0" + web3-providers-ipc@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.2.tgz#68a516883c998eeddf60df4cead77baca4fb4aaa" @@ -24991,6 +25284,14 @@ web3-providers-ipc@1.6.0: oboe "2.1.5" web3-core-helpers "1.6.0" +web3-providers-ipc@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.7.0.tgz#152dc1231eb4f17426498d4d5d973c865eab03d9" + integrity sha512-U5YLXgu6fvAK4nnMYqo9eoml3WywgTym0dgCdVX/n1UegLIQ4nctTubBAuWQEJzmAzwh+a6ValGcE7ZApTRI7Q== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.7.0" + web3-providers-ws@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.2.tgz#d336a93ed608b40cdcadfadd1f1bc8d32ea046e0" @@ -25009,6 +25310,15 @@ web3-providers-ws@1.6.0: web3-core-helpers "1.6.0" websocket "^1.0.32" +web3-providers-ws@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.7.0.tgz#99c2de9f6b5ac56e926794ef9074c7442d937372" + integrity sha512-0a8+lVV3JBf+eYnGOsdzOpftK1kis5X7s35QAdoaG5SDapnEylXFlR4xDSSSU88ZwMwvse8hvng2xW6A7oeWxw== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.7.0" + websocket "^1.0.32" + web3-shh@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.2.tgz#a72a3d903c0708a004db94a72d934a302d880aea" @@ -25029,6 +25339,16 @@ web3-shh@1.6.0: web3-core-subscriptions "1.6.0" web3-net "1.6.0" +web3-shh@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.7.0.tgz#ed9d085b670bb5a938f2847393478e33df3ec95c" + integrity sha512-RZhxcevALIPK178VZCpwMBvQeW+IoWtRJ4EMdegpbnETeZaC3aRUcs6vKnrf0jXJjm4J/E2Dt438Y1Ord/1IMw== + dependencies: + web3-core "1.7.0" + web3-core-method "1.7.0" + web3-core-subscriptions "1.7.0" + web3-net "1.7.0" + web3-utils@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.5.2.tgz#150982dcb1918ffc54eba87528e28f009ebc03aa" @@ -25055,6 +25375,19 @@ web3-utils@1.6.0: randombytes "^2.1.0" utf8 "3.0.0" +web3-utils@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.0.tgz#c59f0fd43b2449357296eb54541810b99b1c771c" + integrity sha512-O8Tl4Ky40Sp6pe89Olk2FsaUkgHyb5QAXuaKo38ms3CxZZ4d3rPGfjP9DNKGm5+IUgAZBNpF1VmlSmNCqfDI1w== + dependencies: + bn.js "^4.11.9" + ethereum-bloom-filters "^1.0.6" + ethereumjs-util "^7.1.0" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + web3@0.20.7: version "0.20.7" resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.7.tgz#1605e6d81399ed6f85a471a4f3da0c8be57df2f7" @@ -25092,6 +25425,19 @@ web3@1.6.0: web3-shh "1.6.0" web3-utils "1.6.0" +web3@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.7.0.tgz#5867cd10a2bebb5c33fc218368e3f6f826f6897e" + integrity sha512-n39O7QQNkpsjhiHMJ/6JY6TaLbdX+2FT5iGs8tb3HbIWOhPm4+a7UDbr5Lkm+gLa9aRKWesZs5D5hWyEvg4aJA== + dependencies: + web3-bzz "1.7.0" + web3-core "1.7.0" + web3-eth "1.7.0" + web3-eth-personal "1.7.0" + web3-net "1.7.0" + web3-shh "1.7.0" + web3-utils "1.7.0" + web3js-quorum@21.7.0-rc1: version "21.7.0-rc1" resolved "https://registry.yarnpkg.com/web3js-quorum/-/web3js-quorum-21.7.0-rc1.tgz#42b79dee701f554a14f172523c0e0dc6003de22e"